From: vsv Date: Thu, 7 Nov 2019 14:18:41 +0000 (+0300) Subject: 5.2.2 Drawing in the sketcher: change the mouse cursor arrow X-Git-Tag: V9_5_0a1~166^2~19 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8863c8d574bcc336bd397301b65de4841f3505cf;p=modules%2Fshaper.git 5.2.2 Drawing in the sketcher: change the mouse cursor arrow --- diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index fa801f6aa..59d1b14da 100644 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -434,9 +434,11 @@ void PartSet_Module::updateSketcherOnStart(ModuleBase_Operation* theOperation) if (PartSet_SketcherMgr::isSketchOperation(theOperation)) { mySketchMgr->startSketch(theOperation); } - else if (sketchMgr()->isNestedSketchOperation(theOperation)) { - mySketchMgr->startNestedSketch(theOperation); - } + // It is switched off because of + // Task #3067: 5.2.2 Drawing in the sketcher: change the mouse cursor arrow + //else if (sketchMgr()->isNestedSketchOperation(theOperation)) { + // mySketchMgr->startNestedSketch(theOperation); + //} } //****************************************************** diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index 1c88fc4f6..8d8ec531f 100644 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -220,15 +220,17 @@ void PartSet_SketcherMgr::onEnterViewPort() return; #endif - if (canChangeCursor(getCurrentOperation())) { - QCursor* aCurrentCursor = QApplication::overrideCursor(); - if (!aCurrentCursor || aCurrentCursor->shape() != Qt::CrossCursor) { - QApplication::setOverrideCursor(QCursor(Qt::CrossCursor)); -#ifdef DEBUG_CURSOR - qDebug("onEnterViewPort() : Qt::CrossCursor"); -#endif - } - } + // It is switched off because of + // Task #3067: 5.2.2 Drawing in the sketcher: change the mouse cursor arrow + // if (canChangeCursor(getCurrentOperation())) { + // QCursor* aCurrentCursor = QApplication::overrideCursor(); + // if (!aCurrentCursor || aCurrentCursor->shape() != Qt::CrossCursor) { + // QApplication::setOverrideCursor(QCursor(Qt::CrossCursor)); + //#ifdef DEBUG_CURSOR + // qDebug("onEnterViewPort() : Qt::CrossCursor"); + //#endif + // } + // } if (!isNestedCreateOperation(getCurrentOperation(), activeSketch())) return; @@ -260,12 +262,12 @@ void PartSet_SketcherMgr::onLeaveViewPort() return; #endif - if (canChangeCursor(getCurrentOperation())) { - QApplication::restoreOverrideCursor(); -#ifdef DEBUG_CURSOR - qDebug("onLeaveViewPort() : None"); -#endif - } +// if (canChangeCursor(getCurrentOperation())) { +// QApplication::restoreOverrideCursor(); +//#ifdef DEBUG_CURSOR +// qDebug("onLeaveViewPort() : None"); +//#endif +// } if (!isNestedCreateOperation(getCurrentOperation(), activeSketch())) return; @@ -1184,18 +1186,18 @@ void PartSet_SketcherMgr::stopSketch(ModuleBase_Operation* theOperation) workshop()->viewer()->set2dMode(false); } -void PartSet_SketcherMgr::startNestedSketch(ModuleBase_Operation* theOperation) -{ - if (canChangeCursor(theOperation) && myIsMouseOverWindow) { - QCursor* aCurrentCursor = QApplication::overrideCursor(); - if (!aCurrentCursor || aCurrentCursor->shape() != Qt::CrossCursor) { - QApplication::setOverrideCursor(QCursor(Qt::CrossCursor)); -#ifdef DEBUG_CURSOR - qDebug("startNestedSketch() : Qt::CrossCursor"); -#endif - } - } -} +//void PartSet_SketcherMgr::startNestedSketch(ModuleBase_Operation* theOperation) +//{ +// if (canChangeCursor(theOperation) && myIsMouseOverWindow) { +// QCursor* aCurrentCursor = QApplication::overrideCursor(); +// if (!aCurrentCursor || aCurrentCursor->shape() != Qt::CrossCursor) { +// QApplication::setOverrideCursor(QCursor(Qt::CrossCursor)); +//#ifdef DEBUG_CURSOR +// qDebug("startNestedSketch() : Qt::CrossCursor"); +//#endif +// } +// } +//} void PartSet_SketcherMgr::stopNestedSketch(ModuleBase_Operation* theOperation) { @@ -1203,7 +1205,7 @@ void PartSet_SketcherMgr::stopNestedSketch(ModuleBase_Operation* theOperation) operationMgr()->onValidateOperation(); // when sketch nested operation is stopped the cursor should be restored unconditionally //if (canChangeCursor(theOperation)) { - QApplication::restoreOverrideCursor(); + //QApplication::restoreOverrideCursor(); #ifdef DEBUG_CURSOR qDebug("stopNestedSketch() : None"); #endif diff --git a/src/PartSet/PartSet_SketcherMgr.h b/src/PartSet/PartSet_SketcherMgr.h index 7259514a4..678baaa3f 100644 --- a/src/PartSet/PartSet_SketcherMgr.h +++ b/src/PartSet/PartSet_SketcherMgr.h @@ -217,7 +217,7 @@ public: /// Starts sketch operation, connects to the opeation property panel /// \param theOperation a committed operation - void startNestedSketch(ModuleBase_Operation* theOperation); + //void startNestedSketch(ModuleBase_Operation* theOperation); /// Stop sketch operation, disconnects from the opeation property panel /// \param theOperation a stopped operation