]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1011 In sketch edition, the cross cursor must be displayed only in the 3D...
authornds <nds@opencascade.com>
Thu, 8 Oct 2015 11:01:46 +0000 (14:01 +0300)
committernds <nds@opencascade.com>
Thu, 8 Oct 2015 11:01:46 +0000 (14:01 +0300)
src/PartSet/PartSet_SketcherMgr.cpp

index c1a80e4bdca5a275e0fdcae8e02711d7196da3e9..2185f64fc6d0be97188d998dddc8cd5c4eaa6afd 100644 (file)
@@ -205,7 +205,9 @@ void PartSet_SketcherMgr::onEnterViewPort()
 
   if (!isNestedCreateOperation(getCurrentOperation()))
     return;
-    operationMgr()->onValidateOperation();
+
+  QApplication::setOverrideCursor(QCursor(Qt::CrossCursor));//QIcon(":pictures/button_plus.png").pixmap(20,20)));
+  operationMgr()->onValidateOperation();
 
   // we need change displayed state of the current operation feature
   // if the feature is presentable, e.g. distance construction. It has no results, so workshop does
@@ -240,6 +242,9 @@ void PartSet_SketcherMgr::onLeaveViewPort()
 
   if (!isNestedCreateOperation(getCurrentOperation()))
     return;
+
+  QApplication::restoreOverrideCursor();
+
   // the method should be performed if the popup menu is called,
   // the reset of the current widget should not happen
   if (myIsPopupMenuActive)
@@ -919,7 +924,7 @@ void PartSet_SketcherMgr::stopSketch(ModuleBase_Operation* theOperation)
 void PartSet_SketcherMgr::startNestedSketch(ModuleBase_Operation* theOperation)
 {
   connectToPropertyPanel(true);
-  if (isNestedCreateOperation(theOperation))
+  if (isNestedCreateOperation(theOperation) && myIsMouseOverWindow)
     QApplication::setOverrideCursor(QCursor(Qt::CrossCursor));//QIcon(":pictures/button_plus.png").pixmap(20,20)));
 }