mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Fix of crash and/or assert when changing language
This commit is contained in:
parent
1d337b0e24
commit
2c9bd86a70
2 changed files with 16 additions and 11 deletions
|
@ -3191,6 +3191,9 @@ std::string format_mouse_event_debug_message(const wxMouseEvent &evt)
|
|||
|
||||
void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
||||
{
|
||||
if (!m_initialized || !_set_current())
|
||||
return;
|
||||
|
||||
#if ENABLE_RETINA_GL
|
||||
const float scale = m_retina_helper->get_scale_factor();
|
||||
evt.SetX(evt.GetX() * scale);
|
||||
|
@ -3260,9 +3263,6 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
|||
return;
|
||||
}
|
||||
|
||||
if (m_picking_enabled)
|
||||
_set_current();
|
||||
|
||||
int selected_object_idx = m_selection.get_object_idx();
|
||||
int layer_editing_object_idx = is_layers_editing_enabled() ? selected_object_idx : -1;
|
||||
m_layers_editing.select_object(*m_model, layer_editing_object_idx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue