Salome HOME
Issue #2441: Switch off filtering of the same geometrical points for Group and Field...
authorvsv <vsv@opencascade.com>
Wed, 21 Feb 2018 12:56:23 +0000 (15:56 +0300)
committervsv <vsv@opencascade.com>
Wed, 21 Feb 2018 12:56:23 +0000 (15:56 +0300)
src/CollectionPlugin/group_widget.xml
src/CollectionPlugin/plugin-Collection.xml
src/ModuleBase/ModuleBase_WidgetSelector.cpp
src/ModuleBase/ModuleBase_WidgetSelector.h

index fab719c415252a9afd7bc0722b5e1bb7a08c1b82..4696d9e790ce3ce22d81dcecab882b42034414e5 100644 (file)
@@ -28,7 +28,8 @@ email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com
     tooltip="Select a set of objects"
     type_choice="Vertices Edges Faces Solids"
     use_choice="true"
-    clear_in_neutral_point="false">
+    clear_in_neutral_point="false"
+    filter_points="false" >
     <validator id="GeomValidators_BodyShapes"/>
   </multi_selector>
 </source>
\ No newline at end of file
index 156c1bbd48ef703037e91342bebefc143e5ea0f6..ecedd11c431da67e3bc0e2a26fd3440b1faf59ef 100644 (file)
@@ -34,7 +34,8 @@ email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com
         title="Field"
         tooltip="Create fields for selected shapes"
         icon="icons/Collection/field.png">
-        <field-panel id="selected">
+        <field-panel id="selected"
+          filter_points="false" >
           <validator id="GeomValidators_BodyShapes"/>
         </field-panel>
       </feature>
index 673f0e18cbdab9425c7f00bc80b65445019c9e6f..665c9e56befda9c91613a5d48d0b6d6811126be6 100755 (executable)
 #include <ModelAPI_Events.h>
 #include <ModelAPI_ResultConstruction.h>
 
+#include <Config_WidgetAPI.h>
+
 #include <TopoDS_Iterator.hxx>
 
 ModuleBase_WidgetSelector::ModuleBase_WidgetSelector(QWidget* theParent,
                                                      ModuleBase_IWorkshop* theWorkshop,
                                                      const Config_WidgetAPI* theData)
-: ModuleBase_WidgetValidated(theParent, theWorkshop, theData)
+: ModuleBase_WidgetValidated(theParent, theWorkshop, theData),
+myIsPointsFiltering(true)
 {
+  QString aFiltering = QString::fromStdString(theData->getProperty("filter_points"));
+  if (aFiltering.toLower() == "false")
+    myIsPointsFiltering = false;
 }
 
 //********************************************************************
@@ -66,7 +72,8 @@ bool ModuleBase_WidgetSelector::processSelection()
 {
   QList<ModuleBase_ViewerPrsPtr> aSelected = getFilteredSelected();
   // equal vertices should not be used here
-  ModuleBase_ISelection::filterSelectionOnEqualPoints(aSelected);
+  if (myIsPointsFiltering)
+    ModuleBase_ISelection::filterSelectionOnEqualPoints(aSelected);
 
   bool isDone = setSelection(aSelected, true/*false*/);
   updateOnSelectionChanged(isDone);
index fee235ad001f6692aa031124b09b638e2ef16f70..6e798f80ec4b11059ffe310e17a7c9603ced9b54 100755 (executable)
@@ -133,6 +133,9 @@ protected:
   /// \return string value
   static std::string generateName(const AttributePtr& theAttribute,
                                   ModuleBase_IWorkshop* theWorkshop);
+
+protected:
+  bool myIsPointsFiltering;
 };
 
 #endif