Fixed conflict after merge with master

This commit is contained in:
Enrico Turri 2020-03-11 13:16:15 +01:00
commit 4d39050dcd
2 changed files with 14 additions and 14 deletions

View File

@ -3311,10 +3311,8 @@ std::string format_mouse_event_debug_message(const wxMouseEvent &evt)
void GLCanvas3D::on_mouse(wxMouseEvent& evt) void GLCanvas3D::on_mouse(wxMouseEvent& evt)
{ {
#if ENABLE_NON_STATIC_CANVAS_MANAGER if (!m_initialized || !_set_current())
if (!m_initialized)
return; return;
#endif // ENABLE_NON_STATIC_CANVAS_MANAGER
#if ENABLE_RETINA_GL #if ENABLE_RETINA_GL
const float scale = m_retina_helper->get_scale_factor(); const float scale = m_retina_helper->get_scale_factor();
@ -3389,9 +3387,6 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
return; return;
} }
if (m_picking_enabled)
_set_current();
int selected_object_idx = m_selection.get_object_idx(); int selected_object_idx = m_selection.get_object_idx();
int layer_editing_object_idx = is_layers_editing_enabled() ? selected_object_idx : -1; int layer_editing_object_idx = is_layers_editing_enabled() ? selected_object_idx : -1;
m_layers_editing.select_object(*m_model, layer_editing_object_idx); m_layers_editing.select_object(*m_model, layer_editing_object_idx);

View File

@ -877,14 +877,19 @@ void GUI_App::add_config_menu(wxMenuBar *menu)
/* Before change application language, let's check unsaved changes on 3D-Scene /* Before change application language, let's check unsaved changes on 3D-Scene
* and draw user's attention to the application restarting after a language change * and draw user's attention to the application restarting after a language change
*/ */
wxMessageDialog dialog(nullptr, {
_(L("Switching the language will trigger application restart.\n" // the dialog needs to be destroyed before the call to switch_language()
"You will lose content of the plater.")) + "\n\n" + // or sometimes the application crashes into wxDialogBase() destructor
_(L("Do you want to proceed?")), // so we put it into an inner scope
wxString(SLIC3R_APP_NAME) + " - " + _(L("Language selection")), wxMessageDialog dialog(nullptr,
wxICON_QUESTION | wxOK | wxCANCEL); _(L("Switching the language will trigger application restart.\n"
if ( dialog.ShowModal() == wxID_CANCEL) "You will lose content of the plater.")) + "\n\n" +
return; _(L("Do you want to proceed?")),
wxString(SLIC3R_APP_NAME) + " - " + _(L("Language selection")),
wxICON_QUESTION | wxOK | wxCANCEL);
if (dialog.ShowModal() == wxID_CANCEL)
return;
}
switch_language(); switch_language();
break; break;