From 8a281f09011ef6a099719ece7e155c9d5985fa8a Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 12 Jan 2016 06:48:04 +0300 Subject: [PATCH] Improve multi-selector control to provide items multi-selection and "Delete" context menu action. --- src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp | 3 +++ src/ModuleBase/ModuleBase_WidgetMultiSelector.h | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp index 6328648a3..ffc380878 100755 --- a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp @@ -529,4 +529,7 @@ void ModuleBase_WidgetMultiSelector::onListSelection() myDeleteAction->setEnabled(!aItems.isEmpty()); //myWorkshop->setSelected(>setSelected(getAttributeSelection()); + QList aSelectedItems; + + emit itemsSelected(aSelectedItems); } diff --git a/src/ModuleBase/ModuleBase_WidgetMultiSelector.h b/src/ModuleBase/ModuleBase_WidgetMultiSelector.h index 9165161fc..49dbc1a7c 100755 --- a/src/ModuleBase/ModuleBase_WidgetMultiSelector.h +++ b/src/ModuleBase/ModuleBase_WidgetMultiSelector.h @@ -81,6 +81,10 @@ class MODULEBASE_EXPORT ModuleBase_WidgetMultiSelector : public ModuleBase_Widge /// Slot is called on selection type changed void onSelectionTypeChanged(); +signals: + /// Signals about items selected in the list view + void itemsSelected(const QList& theItems); + protected slots: /// Slot for copy command in a list pop-up menu void onCopyItem(); -- 2.39.2