From 313e86ea949e258d3870cc1ac157bb6db429c1cc Mon Sep 17 00:00:00 2001 From: YuSanka Date: Tue, 10 Dec 2019 17:25:30 +0100 Subject: [PATCH] Fixed show context menu for multiple selection in ObjectList --- src/slic3r/GUI/GUI_ObjectList.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index d825b740f..1011bfd5e 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -807,7 +807,7 @@ void ObjectList::list_manipulation(bool evt_context_menu/* = false*/) if (!item) { if (col == nullptr) { - if (wxOSX) + if (wxOSX && !multiple_selection()) UnselectAll(); else if (!evt_context_menu) // Case, when last item was deleted and under GTK was called wxEVT_DATAVIEW_SELECTION_CHANGED, @@ -822,8 +822,13 @@ void ObjectList::list_manipulation(bool evt_context_menu/* = false*/) } if (wxOSX && item && col) { + wxDataViewItemArray sels; + GetSelections(sels); UnselectAll(); - Select(item); + if (sels.Count() > 1) + SetSelections(sels); + else + Select(item); } const wxString title = col->GetTitle();