From e72a0586002dc85332cb3f8833f8c78c9403d799 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Thu, 25 Oct 2018 12:36:10 +0200 Subject: [PATCH] Fixed update of GUI when object is selected by right-clicking on it to show its context menu --- src/slic3r/GUI/GLCanvas3D.cpp | 1 + src/slic3r/GUI/Plater.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 579362555..d70048d85 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -4093,6 +4093,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) // forces the selection of the volume m_selection.add(m_hover_volume_id); m_gizmos.update_on_off_state(m_selection); + post_event(SimpleEvent(EVT_GLCANVAS_OBJECT_SELECT)); update_gizmos_data(); wxGetApp().obj_manipul()->update_settings_value(m_selection); // forces a frame render to update the view before the context menu is shown diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index c307bf2cf..9c228dbdf 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -1374,6 +1374,8 @@ void Plater::priv::selection_changed() _3DScene::enable_toolbar_item(canvas3D, "splitvolumes", can_split_to_volumes()); _3DScene::enable_toolbar_item(canvas3D, "cut", can_cut_object()); _3DScene::enable_toolbar_item(canvas3D, "layersediting", layers_height_allowed()); + // forces a frame render to update the view (to avoid a missed update if, for example, the context menu appears) + _3DScene::render(canvas3D); #else _3DScene::enable_toolbar_item(canvas3D, "fewer", have_sel); _3DScene::enable_toolbar_item(canvas3D, "splitobjects", have_sel);