Salome HOME
Provide distance between points of lines
[modules/shaper.git] / src / XGUI / XGUI_Workshop.cpp
index 5cf57b2aabedd86da81bea8d71135418680bfb3c..a8d23dd5212af78cc510beffafac2f6a03ed8269 100644 (file)
@@ -264,10 +264,11 @@ void XGUI_Workshop::processEvent(const Events_Message* theMessage)
     return;
   }
 
-  if (theMessage->eventID() == Events_Loop::loop()->eventByName("LongOperation")) {
+  if (theMessage->eventID() == Events_LongOp::eventID()) {
     if (Events_LongOp::isPerformed())
       QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
-    else
+      //QTimer::singleShot(10, this, SLOT(onStartWaiting()));
+    else 
       QApplication::restoreOverrideCursor();
     return;
   }
@@ -294,6 +295,14 @@ void XGUI_Workshop::processEvent(const Events_Message* theMessage)
   }
 }
 
+//******************************************************
+void XGUI_Workshop::onStartWaiting()
+{
+  if (Events_LongOp::isPerformed()) {
+    QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+  }
+}
+
 //******************************************************
 void XGUI_Workshop::onFeatureUpdatedMsg(const ModelAPI_ObjectUpdatedMessage* theMsg)
 {
@@ -1031,9 +1040,9 @@ void XGUI_Workshop::registerValidators() const
   PluginManagerPtr aMgr = ModelAPI_PluginManager::get();
   ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
 
-  aFactory->registerValidator("ModuleBase_ResulPointValidator", new ModuleBase_ResulPointValidator);
-  aFactory->registerValidator("ModuleBase_ResulLineValidator", new ModuleBase_ResulLineValidator);
-  aFactory->registerValidator("ModuleBase_ResulArcValidator", new ModuleBase_ResulArcValidator);
+  aFactory->registerValidator("ModuleBase_ResultPointValidator", new ModuleBase_ResultPointValidator);
+  aFactory->registerValidator("ModuleBase_ResultLineValidator", new ModuleBase_ResultLineValidator);
+  aFactory->registerValidator("ModuleBase_ResultArcValidator", new ModuleBase_ResultArcValidator);
 }