void ModuleBase_WidgetMultiSelector::onSelectionTypeChanged()
{
activateSelectionAndFilters(true);
- QList<ModuleBase_ViewerPrsPtr> anEmptyList;
- // This method will call Selection changed event which will call onSelectionChanged
- // To clear mySelection, myListControl and storeValue()
- // So, we don't need to call it
- myWorkshop->setSelected(anEmptyList);
+
+ clearSelection();
}
//********************************************************************
return aType;
}
+//********************************************************************
+void ModuleBase_WidgetMultiSelector::clearSelection()
+{
+ bool isClearInNeutralPoint = myIsNeutralPointClear;
+ myIsNeutralPointClear = true;
+
+ QList<ModuleBase_ViewerPrsPtr> anEmptyList;
+ // This method will call Selection changed event which will call onSelectionChanged
+ // To clear mySelection, myListControl and storeValue()
+ // So, we don't need to call it
+ myWorkshop->setSelected(anEmptyList);
+
+ myIsNeutralPointClear = isClearInNeutralPoint;
+}
+
//********************************************************************
void ModuleBase_WidgetMultiSelector::onCopyItem()
{
/// For example, the "Edges" is converted to "edge"
std::string validatorType(const QString& theType) const;
+ /// Clear selection in the viewer. The content of the widget is cleared also
+ void clearSelection();
+
protected:
/// Returns attribute indices selected in the widget selection list
/// \param theIndices a list of indices