From: nds Date: Wed, 7 Oct 2015 12:05:01 +0000 (+0300) Subject: Issue #1011 In sketch edition, the cross cursor must be displayed only in the 3D... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=68daec9298d9335d6163e2ad90a430a4f168c14b;p=modules%2Fshaper.git Issue #1011 In sketch edition, the cross cursor must be displayed only in the 3D view --- diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index 1a9c7da38..bbf8f35d8 100644 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -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))); }