]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Editor widget is shown if the mouse is over window, otherwise the corresponded double...
authornds <natalia.donis@opencascade.com>
Wed, 8 Apr 2015 11:58:47 +0000 (14:58 +0300)
committernds <natalia.donis@opencascade.com>
Wed, 8 Apr 2015 11:58:47 +0000 (14:58 +0300)
src/PartSet/PartSet_SketcherMgr.cpp
src/PartSet/PartSet_WidgetEditor.cpp

index 359ee319e664327a795cd3f50fb7ba48ddc55763..e404a2f4126c6cd75a3b800fa8dc73c6969e85fd 100644 (file)
@@ -157,18 +157,23 @@ PartSet_SketcherMgr::~PartSet_SketcherMgr()
 
 void PartSet_SketcherMgr::onEnterViewPort()
 {
 
 void PartSet_SketcherMgr::onEnterViewPort()
 {
-  if (!isNestedCreateOperation(getCurrentOperation()))
-    return;
   // 1. if the mouse over window, update the next flag. Do not perform update visibility of
   // created feature because it should be done in onMouseMove(). Some widgets watch
   // the mouse move and use the cursor position to update own values. If the presentaion is
   // redisplayed before this update, the feature presentation jumps from reset value to current.
   myIsMouseOverWindow = true;
   myIsPropertyPanelValueChanged = false;
   // 1. if the mouse over window, update the next flag. Do not perform update visibility of
   // created feature because it should be done in onMouseMove(). Some widgets watch
   // the mouse move and use the cursor position to update own values. If the presentaion is
   // redisplayed before this update, the feature presentation jumps from reset value to current.
   myIsMouseOverWindow = true;
   myIsPropertyPanelValueChanged = false;
+
+  if (!isNestedCreateOperation(getCurrentOperation()))
+    return;
 }
 
 void PartSet_SketcherMgr::onLeaveViewPort()
 {
 }
 
 void PartSet_SketcherMgr::onLeaveViewPort()
 {
+  myIsMouseOverViewProcessed = false;
+  myIsMouseOverWindow = false;
+  myIsPropertyPanelValueChanged = false;
+
   if (!isNestedCreateOperation(getCurrentOperation()))
     return;
   // the method should be performed if the popup menu is called,
   if (!isNestedCreateOperation(getCurrentOperation()))
     return;
   // the method should be performed if the popup menu is called,
@@ -176,9 +181,6 @@ void PartSet_SketcherMgr::onLeaveViewPort()
   if (myIsPopupMenuActive)
     return;
 
   if (myIsPopupMenuActive)
     return;
 
-  myIsMouseOverViewProcessed = false;
-  myIsMouseOverWindow = false;
-
   // 2. if the mouse IS NOT over window, reset the active widget value and hide the presentation
   ModuleBase_IWorkshop* aWorkshop = myModule->workshop();
   XGUI_ModuleConnector* aConnector = dynamic_cast<XGUI_ModuleConnector*>(aWorkshop);
   // 2. if the mouse IS NOT over window, reset the active widget value and hide the presentation
   ModuleBase_IWorkshop* aWorkshop = myModule->workshop();
   XGUI_ModuleConnector* aConnector = dynamic_cast<XGUI_ModuleConnector*>(aWorkshop);
@@ -195,7 +197,7 @@ void PartSet_SketcherMgr::onLeaveViewPort()
   aDisplayer->enableUpdateViewer(isEnableUpdateViewer);
 
   // hides the presentation of the current operation feature
   aDisplayer->enableUpdateViewer(isEnableUpdateViewer);
 
   // hides the presentation of the current operation feature
-  myIsPropertyPanelValueChanged = false;
+  //myIsPropertyPanelValueChanged = false;
   // the feature is to be erased here, but it is correct to call canDisplayObject because
   // there can be additional check (e.g. editor widget in distance constraint)
   FeaturePtr aFeature = getCurrentOperation()->feature();
   // the feature is to be erased here, but it is correct to call canDisplayObject because
   // there can be additional check (e.g. editor widget in distance constraint)
   FeaturePtr aFeature = getCurrentOperation()->feature();
index 66ed150b86e2c2947c633598f781bd79c0a97e1e..4857863b5ea31d1f905187ffcb0a67fad13d6ac7 100644 (file)
@@ -24,8 +24,8 @@ bool PartSet_WidgetEditor::focusTo()
 {
   PartSet_Module* aModule = dynamic_cast<PartSet_Module*>(myWorkshop->module());
   if (aModule->isMouseOverWindow())
 {
   PartSet_Module* aModule = dynamic_cast<PartSet_Module*>(myWorkshop->module());
   if (aModule->isMouseOverWindow())
-    return ModuleBase_WidgetDoubleValue::focusTo();
+    return ModuleBase_WidgetEditor::focusTo();
   else {
   else {
-    ModuleBase_WidgetEditor::focusTo();
+    return ModuleBase_WidgetDoubleValue::focusTo();
   }
 }
   }
 }