Salome HOME
Hide run-time warning, define to debug the cross cursor in sketch.
authornds <nds@opencascade.com>
Tue, 17 Nov 2015 10:49:06 +0000 (13:49 +0300)
committernds <nds@opencascade.com>
Tue, 17 Nov 2015 10:49:28 +0000 (13:49 +0300)
src/ModuleBase/ModuleBase_DoubleSpinBox.cpp
src/PartSet/PartSet_SketcherMgr.cpp

index 745592709c31534aa7b88a098eb42ceefe3b0cee..488e8f11c4d9fc03b9f6b74854237770ad216e15 100644 (file)
@@ -79,7 +79,7 @@ ModuleBase_DoubleSpinBox::ModuleBase_DoubleSpinBox(QWidget* theParent, int thePr
   connect(lineEdit(), SIGNAL(textChanged( const QString& )), this,
           SLOT(onTextChanged( const QString& )));
 
-  connect(this, SIGNAL(valueChanged(const QString&)), this, SLOT(onValueChanged(const QString&)));
+  //connect(this, SIGNAL(valueChanged(const QString&)), this, SLOT(onValueChanged(const QString&)));
 }
 
 /*!
index dcdd6ecc6f52b0e915efe5fdd4f0fefa00f31c63..81d1cf6c869328daa5dd42f3a347992ee124f7f0 100755 (executable)
@@ -78,6 +78,8 @@
 
 //#define DEBUG_DO_NOT_BY_ENTER
 
+//#define DEBUG_CURSOR
+
 /// Returns list of unique objects by sum of objects from List1 and List2
 /*QList<ModuleBase_ViewerPrs> getSumList(const QList<ModuleBase_ViewerPrs>& theList1,
                                        const QList<ModuleBase_ViewerPrs>& theList2)
@@ -197,8 +199,12 @@ void PartSet_SketcherMgr::onEnterViewPort()
   return;
   #endif
 
-  if (canChangeCursor(getCurrentOperation()))
+  if (canChangeCursor(getCurrentOperation())) {
+#ifdef DEBUG_CURSOR
+    qDebug("onEnterViewPort() : Qt::CrossCursor");
+#endif
     QApplication::setOverrideCursor(QCursor(Qt::CrossCursor));
+  }
 
   if (!isNestedCreateOperation(getCurrentOperation()))
     return;
@@ -233,8 +239,12 @@ void PartSet_SketcherMgr::onLeaveViewPort()
   return;
   #endif
 
-  if (canChangeCursor(getCurrentOperation()))
+  if (canChangeCursor(getCurrentOperation())) {
     QApplication::restoreOverrideCursor();
+#ifdef DEBUG_CURSOR
+    qDebug("onLeaveViewPort() : None");
+#endif
+  }
 
   if (!isNestedCreateOperation(getCurrentOperation()))
     return;
@@ -914,16 +924,24 @@ void PartSet_SketcherMgr::stopSketch(ModuleBase_Operation* theOperation)
 
 void PartSet_SketcherMgr::startNestedSketch(ModuleBase_Operation* theOperation)
 {
-  if (canChangeCursor(theOperation) && myIsMouseOverWindow)
+  if (canChangeCursor(theOperation) && myIsMouseOverWindow) {
     QApplication::setOverrideCursor(QCursor(Qt::CrossCursor));
+#ifdef DEBUG_CURSOR
+    qDebug("startNestedSketch() : Qt::CrossCursor");
+#endif
+  }
 }
 
 void PartSet_SketcherMgr::stopNestedSketch(ModuleBase_Operation* theOperation)
 {
   myIsMouseOverViewProcessed = true;
   operationMgr()->onValidateOperation();
-  if (canChangeCursor(theOperation))
+  if (canChangeCursor(theOperation)) {
     QApplication::restoreOverrideCursor();
+#ifdef DEBUG_CURSOR
+    qDebug("stopNestedSketch() : None");
+#endif
+  }
 }
 
 void PartSet_SketcherMgr::commitNestedSketch(ModuleBase_Operation* theOperation)