From d9aad73be5a44ff8e42162a30a0d9045df7f3837 Mon Sep 17 00:00:00 2001 From: nds Date: Thu, 8 Oct 2015 14:01:46 +0300 Subject: [PATCH] Issue #1011 In sketch edition, the cross cursor must be displayed only in the 3D view --- src/PartSet/PartSet_SketcherMgr.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index c1a80e4bd..2185f64fc 100644 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -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))); } -- 2.39.2