X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFiltersPlugin%2FFiltersPlugin_OnLine.cpp;h=99fc3e2e1d78b04b118bebc6cec284bfc833fe92;hb=77ce6d35ac8d2f0fdaecb4f23e0870bf74e36103;hp=d2e4384320237f5a635ad7d221fe6b2bfb27b53d;hpb=a47af7109078eea1a585d1f10a176f16ab838b87;p=modules%2Fshaper.git diff --git a/src/FiltersPlugin/FiltersPlugin_OnLine.cpp b/src/FiltersPlugin/FiltersPlugin_OnLine.cpp index d2e438432..99fc3e2e1 100644 --- a/src/FiltersPlugin/FiltersPlugin_OnLine.cpp +++ b/src/FiltersPlugin/FiltersPlugin_OnLine.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2019 CEA/DEN, EDF R&D +// Copyright (C) 2014-2024 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -31,7 +31,10 @@ static void convertToLines(const AttributeSelectionListPtr& theSelected, std::list& theLines) { for (int i = 0; i < theSelected->size(); i++) { - GeomShapePtr aCurShape = theSelected->value(i)->value(); + AttributeSelectionPtr aSel = theSelected->value(i); + GeomShapePtr aCurShape = aSel->value(); + if (!aCurShape) + aCurShape = aSel->context()->shape(); if (aCurShape && aCurShape->isEdge()) { GeomLinePtr aLine = aCurShape->edge()->line(); if (aLine) @@ -79,20 +82,9 @@ bool FiltersPlugin_OnLine::isOk(const GeomShapePtr& theShape, const ResultPtr&, return false; } -static std::string XMLRepresentation = -"" -" " -" " -" " -""; - - std::string FiltersPlugin_OnLine::xmlRepresentation() const { - return XMLRepresentation; + return xmlFromFile("filter-OnLine.xml"); } void FiltersPlugin_OnLine::initAttributes(ModelAPI_FiltersArgs& theArguments)