]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Bug: sketch, closed controur, group, selection of edge. The result is that all edges...
authornds <nds@opencascade.com>
Tue, 17 Nov 2015 05:20:00 +0000 (08:20 +0300)
committernds <nds@opencascade.com>
Tue, 17 Nov 2015 05:20:25 +0000 (08:20 +0300)
Reason: sketch manager is performed for the Group feature.

src/PartSet/PartSet_SketcherMgr.cpp
src/PartSet/PartSet_SketcherMgr.h

index 5accebfb8c86c424ceea17a0ad5cb011b2857c03..dcdd6ecc6f52b0e915efe5fdd4f0fefa00f31c63 100755 (executable)
@@ -271,7 +271,8 @@ void PartSet_SketcherMgr::onLeaveViewPort()
 
 void PartSet_SketcherMgr::onBeforeValuesChangedInPropertyPanel()
 {
-  if (isNestedCreateOperation(getCurrentOperation()))
+  if (!isNestedEditOperation(getCurrentOperation()) ||
+      myModule->sketchReentranceMgr()->isInternalEditActive())
     return;
   // it is necessary to save current selection in order to restore it after the values are modifed
   storeSelection();
@@ -284,7 +285,8 @@ void PartSet_SketcherMgr::onBeforeValuesChangedInPropertyPanel()
 
 void PartSet_SketcherMgr::onAfterValuesChangedInPropertyPanel()
 {
-  if (isNestedCreateOperation(getCurrentOperation()))
+  if (!isNestedEditOperation(getCurrentOperation()) ||
+      myModule->sketchReentranceMgr()->isInternalEditActive())
     return;
   // it is necessary to restore current selection in order to restore it after the values are modified
   restoreSelection();
@@ -767,6 +769,13 @@ bool PartSet_SketcherMgr::isNestedCreateOperation(ModuleBase_Operation* theOpera
   return aFOperation && !aFOperation->isEditOperation() && isNestedSketchOperation(aFOperation);
 }
 
+bool PartSet_SketcherMgr::isNestedEditOperation(ModuleBase_Operation* theOperation)
+{
+  ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
+                                                               (theOperation);
+  return aFOperation && aFOperation->isEditOperation() && isNestedSketchOperation(aFOperation);
+}
+
 bool PartSet_SketcherMgr::isEntity(const std::string& theId)
 {
   return (theId == SketchPlugin_Line::ID()) ||
index 3b3280152fdb39a516cc83c5b63266c4eb0eb3a6..284d2b31602c5626332d14b5420a6ebfd1265fe5 100644 (file)
@@ -94,6 +94,11 @@ public:
   //// \return boolean value
   static bool isNestedCreateOperation(ModuleBase_Operation* theOperation);
 
+  /// Returns true if the operation is an edit nested feature one
+  /// \param theOperation a checked operation
+  //// \return boolean value
+  static bool isNestedEditOperation(ModuleBase_Operation* theOperation);
+
   /// Returns whether the current operation is a sketch entity - line, point, arc or circle
   /// \param theId is an id of object
   /// \return a boolean value