diff --git a/src/imgui/imconfig.h b/src/imgui/imconfig.h index abfdd77cf..87c73dc74 100644 --- a/src/imgui/imconfig.h +++ b/src/imgui/imconfig.h @@ -210,8 +210,8 @@ namespace ImGui const wchar_t AddFilamentIcon = 0x0844; const wchar_t AddFilamentDarkIcon = 0x0845; - const wchar_t DeleteFilamentIcon = 0x0845; - const wchar_t DeleteFilamentDarkIcon = 0x0846; + const wchar_t DeleteFilamentIcon = 0x0846; + const wchar_t DeleteFilamentDarkIcon = 0x0847; // void MyFunction(const char* name, const MyMatrix44& v); } diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index c8e9aa68b..96a26c9d3 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -139,8 +139,14 @@ ObjectList::ObjectList(wxWindow* parent) : // Workaround for entering the column editing mode on Windows. Simulate keyboard enter when another column of the active line is selected. int new_selected_column = -1; #endif //__WXMSW__ - if (wxGetKeyState(WXK_SHIFT)) - { + if (wxGetKeyState(WXK_SHIFT)) { + GLGizmosManager &gizmos_mgr = wxGetApp().plater()->get_view3D_canvas3D()->get_gizmos_manager(); + if (gizmos_mgr.is_gizmo_activable_when_single_full_instance()) { + // selection will not be single_full_instance after shift_pressed,Caused exe crashed + UnselectAll(); + Select(m_last_selected_item); + return; + } wxDataViewItemArray sels; GetSelections(sels); if (! sels.empty() && sels.front() == m_last_selected_item) diff --git a/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp b/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp index dfd288b32..9c4e59293 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp @@ -631,6 +631,21 @@ void GLGizmosManager::set_painter_gizmo_data() dynamic_cast(m_gizmos[MmuSegmentation].get())->set_painter_gizmo_data(m_parent.get_selection()); } +bool GLGizmosManager::is_gizmo_activable_when_single_full_instance() { + if (get_current_type() == GLGizmosManager::EType::Flatten || + get_current_type() == GLGizmosManager::EType::Cut || + get_current_type() == GLGizmosManager::EType::MeshBoolean || + get_current_type() == GLGizmosManager::EType::Text || + get_current_type() == GLGizmosManager::EType::Seam || + get_current_type() == GLGizmosManager::EType::FdmSupports || + get_current_type() == GLGizmosManager::EType::MmuSegmentation || + get_current_type() == GLGizmosManager::EType::Simplify + ) { + return true; + } + return false; +} + // Returns true if the gizmo used the event to do something, false otherwise. bool GLGizmosManager::gizmo_event(SLAGizmoEventType action, const Vec2d& mouse_position, bool shift_down, bool alt_down, bool control_down) { diff --git a/src/slic3r/GUI/Gizmos/GLGizmosManager.hpp b/src/slic3r/GUI/Gizmos/GLGizmosManager.hpp index fefb85b6b..61f57142a 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmosManager.hpp +++ b/src/slic3r/GUI/Gizmos/GLGizmosManager.hpp @@ -276,6 +276,7 @@ public: void set_painter_gizmo_data(); + bool is_gizmo_activable_when_single_full_instance(); bool gizmo_event(SLAGizmoEventType action, const Vec2d& mouse_position = Vec2d::Zero(), bool shift_down = false, bool alt_down = false, bool control_down = false); ClippingPlane get_clipping_plane() const; ClippingPlane get_assemble_view_clipping_plane() const;