From 80b380850d212f0febdaf53a50548155d598d92c Mon Sep 17 00:00:00 2001 From: mpv Date: Tue, 18 Jun 2019 16:50:37 +0300 Subject: [PATCH] Correct processing of parametric update of filters arguments --- src/FiltersPlugin/FiltersPlugin_OnPlane.cpp | 8 +++----- src/Model/Model_AttributeSelection.cpp | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/FiltersPlugin/FiltersPlugin_OnPlane.cpp b/src/FiltersPlugin/FiltersPlugin_OnPlane.cpp index 3bb1019a2..c86a33474 100644 --- a/src/FiltersPlugin/FiltersPlugin_OnPlane.cpp +++ b/src/FiltersPlugin/FiltersPlugin_OnPlane.cpp @@ -99,11 +99,9 @@ bool FiltersPlugin_OnPlane::isOk(const GeomShapePtr& theShape, for (int i = 0; i < aList->size(); i++) { AttributeSelectionPtr aAttr = aList->value(i); GeomShapePtr aGeom = aAttr->value(); - if (!aGeom->isSame(theShape)) { - GeomPlanePtr aPlane = getPlane(aAttr); - if (aPlane->isCoincident(aPln)) - return true; - } + GeomPlanePtr aPlane = getPlane(aAttr); + if (aPlane->isCoincident(aPln)) + return true; } } } diff --git a/src/Model/Model_AttributeSelection.cpp b/src/Model/Model_AttributeSelection.cpp index 8ae93763d..88a1610d5 100644 --- a/src/Model/Model_AttributeSelection.cpp +++ b/src/Model/Model_AttributeSelection.cpp @@ -730,6 +730,22 @@ std::string Model_AttributeSelection::namingName(const std::string& theDefaultNa if(!this->isInitialized()) return !theDefaultName.empty() ? theDefaultName : aName; + // not argument has not parametric name (filters) + if (!this->isArgument() || (myParent && !myParent->isArgument())) { + GeomShapePtr aShape = value(); + if (!aShape.get() && context().get()) + aShape = context()->shape(); + std::string aName; + if (aShape.get()) { + aName = aShape->shapeTypeStr(); + if (myParent) { + aName += std::string("_") + + TCollection_AsciiString(selectionLabel().Father().Tag()).ToCString(); + } + } + return aName; + } + CenterType aCenterType = NOT_CENTER; std::shared_ptr aSubSh = internalValue(aCenterType); ResultPtr aCont = context(); -- 2.39.2