]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1749 Not updating the list "Selected objects" in the feature "Group"
authornds <nds@opencascade.com>
Fri, 25 Nov 2016 08:56:02 +0000 (11:56 +0300)
committernds <nds@opencascade.com>
Fri, 25 Nov 2016 08:56:02 +0000 (11:56 +0300)
src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp
src/ModuleBase/ModuleBase_WidgetMultiSelector.h

index 8064ae31f94fccc33d268b151972452ab5b1241e..d2e8355f30c8069f77d981de0bca61477cade666 100755 (executable)
@@ -394,11 +394,8 @@ QList<QWidget*> ModuleBase_WidgetMultiSelector::getControls() const
 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();
 }
 
 //********************************************************************
@@ -548,6 +545,21 @@ std::string ModuleBase_WidgetMultiSelector::validatorType(const QString& theType
   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()
 {
index d502e1506f1a7588c5663350fce3ac2d26c005f6..1e61a581e5ef371b3fe9553bbf696162097761db 100755 (executable)
@@ -138,6 +138,9 @@ protected:
   /// 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