]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for the issue #2974 : inverse flag is not restored in the filters selection feature
authormpv <mpv@opencascade.com>
Tue, 30 Jul 2019 11:51:08 +0000 (14:51 +0300)
committermpv <mpv@opencascade.com>
Tue, 30 Jul 2019 11:51:22 +0000 (14:51 +0300)
src/FiltersPlugin/FiltersPlugin_Selection.cpp

index fde5dda2903d91fc21f514193a4e61054edbb096..7fe056aba5aee9fadbf2b5d2f65023ac9b21a4e8 100644 (file)
@@ -123,7 +123,8 @@ void FiltersPlugin_Selection::initAttributes()
       std::shared_ptr<ModelAPI_AttributeBoolean> aBool =
         std::dynamic_pointer_cast<ModelAPI_AttributeBoolean>(data()->addFloatingAttribute(
           kReverseAttrID, ModelAPI_AttributeBoolean::typeId(), *aFIt));
-      aBool->setValue(false); // not reversed by default
+      if (!aBool->isInitialized())
+        aBool->setValue(false); // not reversed by default
       ModelAPI_FiltersArgs anArgs;
       anArgs.setFeature(std::dynamic_pointer_cast<ModelAPI_FiltersFeature>(data()->owner()));
       anArgs.setFilter(*aFIt);