X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FFiltersPlugin%2FFiltersPlugin_OnGeometry.cpp;h=ded1efd5f27141e3bdb75e0aad1fc31d8aa0065a;hb=e8d43f0f31e00aa2162aa2677f636febcc84c311;hp=44d9ff4017a9dd984409b1a8931a63d7e1dc1e92;hpb=a47af7109078eea1a585d1f10a176f16ab838b87;p=modules%2Fshaper.git diff --git a/src/FiltersPlugin/FiltersPlugin_OnGeometry.cpp b/src/FiltersPlugin/FiltersPlugin_OnGeometry.cpp index 44d9ff401..ded1efd5f 100644 --- a/src/FiltersPlugin/FiltersPlugin_OnGeometry.cpp +++ b/src/FiltersPlugin/FiltersPlugin_OnGeometry.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2019 CEA/DEN, EDF R&D +// Copyright (C) 2014-2020 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -35,28 +35,19 @@ bool FiltersPlugin_OnGeometry::isOk(const GeomShapePtr& theShape, const ResultPt if (!aList.get()) return false; for (int i = 0; i < aList->size(); i++) { - AttributeSelectionPtr aAttr = aList->value(i); - GeomShapePtr aGeom = aAttr->value(); - if (aGeom->isSameGeometry(theShape)) + AttributeSelectionPtr aCurAttr = aList->value(i); + GeomShapePtr aGeom = aCurAttr->value(); + if (!aGeom) + aGeom = aCurAttr->context()->shape(); + if (aGeom && aGeom->isSameGeometry(theShape)) return true; } return false; } -static std::string XMLRepresentation = -"" -" " -" " -" " -""; - - std::string FiltersPlugin_OnGeometry::xmlRepresentation() const { - return XMLRepresentation; + return xmlFromFile("filter-OnGeometry.xml"); } void FiltersPlugin_OnGeometry::initAttributes(ModelAPI_FiltersArgs& theArguments)