mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 00:05:59 +08:00
Fix for crash
This commit is contained in:
parent
482b56f108
commit
b9ac8aeafa
@ -343,6 +343,13 @@ bool GLGizmoEmboss::init_create(ModelVolumeType volume_type)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check can't be inside is_activable() cause crash
|
||||||
|
// steps to reproduce: start App -> key 't' -> key 'delete'
|
||||||
|
if (wxGetApp().obj_list()->has_selected_cut_object()) {
|
||||||
|
BOOST_LOG_TRIVIAL(error) << "Can't create text on cut object";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
m_style_manager.discard_style_changes();
|
m_style_manager.discard_style_changes();
|
||||||
|
|
||||||
// set default text
|
// set default text
|
||||||
@ -552,8 +559,7 @@ bool GLGizmoEmboss::on_init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool GLGizmoEmboss::on_is_activable() const {
|
bool GLGizmoEmboss::on_is_activable() const {
|
||||||
return wxGetApp().get_mode() != comSimple &&
|
return wxGetApp().get_mode() != comSimple;
|
||||||
!wxGetApp().obj_list()->has_selected_cut_object();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string GLGizmoEmboss::on_get_name() const { return _u8L("Emboss"); }
|
std::string GLGizmoEmboss::on_get_name() const { return _u8L("Emboss"); }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user