]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
5.2.2 Drawing in the sketcher: change the mouse cursor arrow
authorvsv <vsv@opencascade.com>
Thu, 7 Nov 2019 14:18:41 +0000 (17:18 +0300)
committervsv <vsv@opencascade.com>
Thu, 7 Nov 2019 14:18:41 +0000 (17:18 +0300)
src/PartSet/PartSet_Module.cpp
src/PartSet/PartSet_SketcherMgr.cpp
src/PartSet/PartSet_SketcherMgr.h

index fa801f6aa487cfb0a769b393d40571b47743c7b0..59d1b14da33a71c853920cd4af152917a56d2fac 100644 (file)
@@ -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);
+  //}
 }
 
 //******************************************************
index 1c88fc4f6bf76b4f5e81138a30fd2c795abdae34..8d8ec531f2bea6814846fce9c1cc23c89c3ec5a7 100644 (file)
@@ -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
index 7259514a4eb54083d520cf7e8863bc929d96a348..678baaa3f0c70f1cee927a2c1943a6fdf7ae7071 100644 (file)
@@ -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