diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 05ac0c74f..7ffd6e010 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -3997,6 +3997,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) m_gizmos.update_on_off_state(m_selection); update_gizmos_data(); wxGetApp().obj_manipul()->update_settings_value(m_selection); + post_event(SimpleEvent(EVT_GLCANVAS_OBJECT_SELECT)); m_dirty = true; } #else @@ -4021,16 +4022,10 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) } // propagate event through callback -#if ENABLE_EXTENDED_SELECTION - if (m_picking_enabled && (m_hover_volume_id != -1)) - { - int object_idx = m_selection.get_object_idx(); - _on_select(m_hover_volume_id, object_idx); - } -#else +#if !ENABLE_EXTENDED_SELECTION if (m_picking_enabled && (volume_idx != -1)) _on_select(volume_idx, selected_object_idx); -#endif // ENABLE_EXTENDED_SELECTION +#endif // !ENABLE_EXTENDED_SELECTION #if ENABLE_EXTENDED_SELECTION if (m_hover_volume_id != -1) @@ -4357,10 +4352,11 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) #if ENABLE_EXTENDED_SELECTION m_selection.clear(); wxGetApp().obj_manipul()->update_settings_value(m_selection); + post_event(SimpleEvent(EVT_GLCANVAS_OBJECT_SELECT)); #else deselect_volumes(); -#endif // ENABLE_EXTENDED_SELECTION _on_select(-1, -1); +#endif // ENABLE_EXTENDED_SELECTION update_gizmos_data(); } #if ENABLE_GIZMOS_RESET @@ -6645,6 +6641,7 @@ void GLCanvas3D::_on_move(const std::vector& volume_idxs) } #endif // ENABLE_EXTENDED_SELECTION +#if !ENABLE_EXTENDED_SELECTION void GLCanvas3D::_on_select(int volume_idx, int object_idx) { #if ENABLE_EXTENDED_SELECTION @@ -6680,6 +6677,7 @@ void GLCanvas3D::_on_select(int volume_idx, int object_idx) wxGetApp().obj_list()->select_current_volume(obj_id, vol_id); #endif // !ENABLE_EXTENDED_SELECTION } +#endif // !ENABLE_EXTENDED_SELECTION std::vector GLCanvas3D::_parse_colors(const std::vector& colors) { diff --git a/src/slic3r/GUI/GLCanvas3D.hpp b/src/slic3r/GUI/GLCanvas3D.hpp index 58b414c8d..844e826fe 100644 --- a/src/slic3r/GUI/GLCanvas3D.hpp +++ b/src/slic3r/GUI/GLCanvas3D.hpp @@ -970,7 +970,9 @@ private: #else void _on_move(const std::vector& volume_idxs); #endif // ENABLE_EXTENDED_SELECTION +#if !ENABLE_EXTENDED_SELECTION void _on_select(int volume_idx, int object_idx); +#endif // !ENABLE_EXTENDED_SELECTION // generates the legend texture in dependence of the current shown view type void _generate_legend_texture(const GCodePreviewData& preview_data, const std::vector& tool_colors); diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index 9bf1b03e5..6c9077bad 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -1054,7 +1054,11 @@ void ObjectList::part_selection_changed() m_selected_object_id = obj_idx; +#if ENABLE_EXTENDED_SELECTION + wxGetApp().obj_manipul()->update_settings_value(_3DScene::get_canvas(wxGetApp().canvas3D())->get_selection()); +#else wxGetApp().obj_manipul()->update_values(); +#endif // ENABLE_EXTENDED_SELECTION } void ObjectList::update_manipulation_sizer(const bool is_simple_mode)