]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1343 Improvement of Extrusion and Revolution operations: preview planes should...
authornds <nds@opencascade.com>
Tue, 22 Mar 2016 14:20:06 +0000 (17:20 +0300)
committerdbv <dbv@opencascade.com>
Wed, 6 Apr 2016 10:22:06 +0000 (13:22 +0300)
src/PartSet/PartSet_WidgetSketchCreator.cpp
src/PartSet/PartSet_WidgetSketchCreator.h

index 52e518297b1bf06b06740ddd4fda34113b59c68e..bd70b0f0a3bd2c3a92c52b07349fbee30cab7d48 100644 (file)
@@ -140,7 +140,7 @@ void PartSet_WidgetSketchCreator::setVisibleSelectionControl(const bool theSelec
     }
   } else {
     bool aHidePreview = myPreviewPlanes->isPreviewDisplayed();
-    myPreviewPlanes->showPreviewPlanes(myWorkshop);
+    myPreviewPlanes->erasePreviewPlanes(myWorkshop);
     if (aHidePreview)
       aWorkshop->viewer()->update();
   }
@@ -262,7 +262,9 @@ bool PartSet_WidgetSketchCreator::focusTo()
 
     // we need to call activate here as the widget has no focus accepted controls
     // if these controls are added here, activate will happens automatically after focusIn()
-    activateCustom();
+    XGUI_Workshop* aWorkshop = XGUI_Tools::workshop(myModule->workshop());
+    XGUI_PropertyPanel* aPanel = aWorkshop->propertyPanel();
+    aPanel->activateWidget(this, false);
     return true;
   }
   else {
@@ -281,6 +283,17 @@ bool PartSet_WidgetSketchCreator::focusTo()
   return false;
 }
 
+void PartSet_WidgetSketchCreator::deactivate()
+{
+  ModuleBase_WidgetSelector::deactivate();
+
+  bool aHidePreview = myPreviewPlanes->isPreviewDisplayed();
+  myPreviewPlanes->erasePreviewPlanes(myWorkshop);
+  if (aHidePreview)
+    XGUI_Tools::workshop(myWorkshop)->viewer()->update();
+
+}
+
 void PartSet_WidgetSketchCreator::onResumed(ModuleBase_Operation* theOp)
 {
   CompositeFeaturePtr aCompFeature = 
index 011608ef07938784e477e053cdcd4965415968d1..e0e6276e573238a91967ccace2fca29a2b65bd99 100644 (file)
@@ -47,6 +47,9 @@ public:
   /// \return the state whether the widget can accept the focus
   virtual bool focusTo();
 
+  /// The methiod called when widget is deactivated
+  virtual void deactivate();
+
   /// Editing mode depends on mode of current operation. This value is defined by it.
   virtual void setEditingMode(bool isEditing);