]> 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>
Wed, 7 Oct 2015 12:05:01 +0000 (15:05 +0300)
committernds <nds@opencascade.com>
Wed, 7 Oct 2015 12:05:01 +0000 (15:05 +0300)
src/PartSet/PartSet_SketcherMgr.cpp

index 1a9c7da38c214a063e15970483c66672c976ac28..bbf8f35d89c24385d536e40eb60d42fbbd304635 100644 (file)
@@ -206,7 +206,10 @@ 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
@@ -241,6 +244,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)
@@ -936,7 +942,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)));
 }