Salome HOME
Architecture changes
[modules/shaper.git] / src / PartSet / PartSet_WidgetSketchLabel.cpp
index ff3808fb4752027f3d2c75a40c8a0b9548fd7b10..b167f5a47d31f3afc287d0df3afee39e6442c80b 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "PartSet_WidgetSketchLabel.h"
 #include "PartSet_Tools.h"
+#include "PartSet_Module.h"
 
 #include "SketchPlugin_SketchEntity.h"
 
@@ -195,8 +196,12 @@ void PartSet_WidgetSketchLabel::updateByPlaneSelected(const ModuleBase_ViewerPrs
     // Rotate view if the sketcher plane is selected only from preview planes
     // Preview planes are created only if there is no any shape
     bool aRotate = Config_PropManager::boolean("Sketch planes", "rotate_to_plane", "false");
-    if (aRotate)
+    if (aRotate) {
       myWorkshop->viewer()->setViewProjection(aXYZ.X(), aXYZ.Y(), aXYZ.Z(), aTwist);
+      PartSet_Module* aModule = dynamic_cast<PartSet_Module*>(myWorkshop->module());
+      if (aModule)
+        aModule->onViewTransformed();
+    }
   }
   // 3. Clear text in the label
   myStackWidget->setCurrentIndex(1);
@@ -218,7 +223,7 @@ void PartSet_WidgetSketchLabel::updateByPlaneSelected(const ModuleBase_ViewerPrs
 
   // 6. Update sketcher actions
   XGUI_ActionsMgr* anActMgr = workshop()->actionsMgr();
-  anActMgr->update();
+  myWorkshop->updateCommandStatus();
   myWorkshop->viewer()->update();
 }
 
@@ -487,5 +492,8 @@ void PartSet_WidgetSketchLabel::onSetPlaneView()
     if (myViewInverted->isChecked())
       aDir.Reverse();
     myWorkshop->viewer()->setViewProjection(aDir.X(), aDir.Y(), aDir.Z(), 0.);
+    PartSet_Module* aModule = dynamic_cast<PartSet_Module*>(myWorkshop->module());
+    if (aModule)
+      aModule->onViewTransformed();
   }
 }