myListControl->setContextMenuPolicy(Qt::ActionsContextMenu);
connect(myListControl, SIGNAL(itemSelectionChanged()), SLOT(onListSelection()));
+
+ myIsNeutralPointClear = theData->getBooleanAttribute("clear_in_neutral_point", true);
}
ModuleBase_WidgetMultiSelector::~ModuleBase_WidgetMultiSelector()
myWorkshop->setSelected(anEmptyList);
}
+//********************************************************************
+void ModuleBase_WidgetMultiSelector::onSelectionChanged()
+{
+ if (!myIsNeutralPointClear) {
+ QList<ModuleBase_ViewerPrsPtr> aSelected = getFilteredSelected();
+ if (aSelected.size() == 0)
+ return;
+ }
+ ModuleBase_WidgetSelector::onSelectionChanged();
+}
+
void ModuleBase_WidgetMultiSelector::updateFocus()
{
// Set focus to List control in order to make possible
/// Slot is called on selection type changed
void onSelectionTypeChanged();
+ /// Slot which is called on selection event. Redefined to process XML state about
+ /// clear selection in neutral point
+ virtual void onSelectionChanged();
+
protected slots:
/// Slot for copy command in a list pop-up menu
void onCopyItem();
/// A flag to store use_choice parameter state
bool myIsUseChoice;
+
+ /// A flag to clear selection by click in empty place in the viewer
+ bool myIsNeutralPointClear;
};
#endif /* MODULEBASE_WIDGETFILESELECTOR_H_ */