From f0069a7ad2fe67d072793fe312325a6f30490c7d Mon Sep 17 00:00:00 2001 From: vsv Date: Wed, 21 Feb 2018 15:56:23 +0300 Subject: [PATCH] Issue #2441: Switch off filtering of the same geometrical points for Group and Field operations --- src/CollectionPlugin/group_widget.xml | 3 ++- src/CollectionPlugin/plugin-Collection.xml | 3 ++- src/ModuleBase/ModuleBase_WidgetSelector.cpp | 11 +++++++++-- src/ModuleBase/ModuleBase_WidgetSelector.h | 3 +++ 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/CollectionPlugin/group_widget.xml b/src/CollectionPlugin/group_widget.xml index fab719c41..4696d9e79 100644 --- a/src/CollectionPlugin/group_widget.xml +++ b/src/CollectionPlugin/group_widget.xml @@ -28,7 +28,8 @@ email : webmaster.salome@opencascade.com + clear_in_neutral_point="false" + filter_points="false" > \ No newline at end of file diff --git a/src/CollectionPlugin/plugin-Collection.xml b/src/CollectionPlugin/plugin-Collection.xml index 156c1bbd4..ecedd11c4 100644 --- a/src/CollectionPlugin/plugin-Collection.xml +++ b/src/CollectionPlugin/plugin-Collection.xml @@ -34,7 +34,8 @@ email : webmaster.salome@opencascade.com - + diff --git a/src/ModuleBase/ModuleBase_WidgetSelector.cpp b/src/ModuleBase/ModuleBase_WidgetSelector.cpp index 673f0e18c..665c9e56b 100755 --- a/src/ModuleBase/ModuleBase_WidgetSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetSelector.cpp @@ -37,13 +37,19 @@ #include #include +#include + #include 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 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); diff --git a/src/ModuleBase/ModuleBase_WidgetSelector.h b/src/ModuleBase/ModuleBase_WidgetSelector.h index fee235ad0..6e798f80e 100755 --- a/src/ModuleBase/ModuleBase_WidgetSelector.h +++ b/src/ModuleBase/ModuleBase_WidgetSelector.h @@ -133,6 +133,9 @@ protected: /// \return string value static std::string generateName(const AttributePtr& theAttribute, ModuleBase_IWorkshop* theWorkshop); + +protected: + bool myIsPointsFiltering; }; #endif -- 2.39.2