]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
refs #30 - Sketch base GUI: create, draw lines
authornds <natalia.donis@opencascade.com>
Tue, 20 May 2014 09:17:32 +0000 (13:17 +0400)
committernds <natalia.donis@opencascade.com>
Tue, 20 May 2014 09:17:32 +0000 (13:17 +0400)
Fill the property panel by the sketch current operation on a suboperation finish.

src/ModuleBase/ModuleBase_IOperation.cpp
src/ModuleBase/ModuleBase_IOperation.h
src/XGUI/XGUI_OperationMgr.cpp
src/XGUI/XGUI_OperationMgr.h
src/XGUI/XGUI_Workshop.cpp

index 6853d0d70a27a9f3106c9423e98831c824e10ab7..4e339672b65edcac0e9924f165f1d4c7a146bf05 100644 (file)
@@ -51,6 +51,7 @@ void ModuleBase_IOperation::start()
 
 void ModuleBase_IOperation::resume()
 {
+  emit resumed();
 }
 
 void ModuleBase_IOperation::abort()
index 966d2668104c3d8f55f8602b20e01e36b3f67ce2..b3373e4bf2764955aa3d8513df6a91a9500d3b48 100644 (file)
@@ -69,6 +69,7 @@ signals:
   void aborted(); /// the operation is aborted
   void committed(); /// the operation is committed
   void stopped(); /// the operation is aborted or committed
+  void resumed(); /// the operation is resumed
 
 public slots:
   /// Starts operation
index 00aa7ecc5373c77116021faddf613bfabca4d4ae..ad312dad5c99de848390a0f352ace60621f3675f 100644 (file)
@@ -41,6 +41,7 @@ bool XGUI_OperationMgr::startOperation(ModuleBase_Operation* theOperation)
 
   connect(theOperation, SIGNAL(stopped()), this, SLOT(onOperationStopped()));
   connect(theOperation, SIGNAL(started()), this, SIGNAL(operationStarted()));
+  connect(theOperation, SIGNAL(resumed()), this, SIGNAL(operationResumed()));
 
   theOperation->start();
   return true;
@@ -58,9 +59,6 @@ bool XGUI_OperationMgr::abortOperation()
 
 void XGUI_OperationMgr::resumeOperation(ModuleBase_Operation* theOperation)
 {
-  connect(theOperation, SIGNAL(stopped()), this, SLOT(onOperationStopped()));
-  connect(theOperation, SIGNAL(started()), this, SIGNAL(operationStarted()));
-
   theOperation->resume();
 }
 
index d57ca5cca7ea707356f7680ae08642c242fea9ce..169453b3afd028d40ae7bd888fb4231f5a8d1549 100644 (file)
@@ -53,6 +53,8 @@ signals:
   /// Signal about an operation is stopped. It is emitted after the stop() of operation is done.
   /// \param theOperation a stopped operation
   void operationStopped(ModuleBase_Operation* theOperation);
+  /// Signal about an operation is resumed. It is emitted after the resume() of operation is done.
+  void operationResumed();
 
 protected:
   /// Sets the current operation or NULL
index 1a11dca832d2f22f545eea46e1305eaef5722ffd..19395870bd134ab7c5142e5c2586165529521c06 100644 (file)
@@ -92,6 +92,7 @@ XGUI_Workshop::XGUI_Workshop(XGUI_SalomeConnector* theConnector)
   myViewerProxy = new XGUI_ViewerProxy(this);
 
   connect(myOperationMgr, SIGNAL(operationStarted()),  this, SLOT(onOperationStarted()));
+  connect(myOperationMgr, SIGNAL(operationResumed()),  this, SLOT(onOperationStarted()));
   connect(myOperationMgr, SIGNAL(operationStopped(ModuleBase_Operation*)),
           this, SLOT(onOperationStopped(ModuleBase_Operation*)));
   connect(this, SIGNAL(errorOccurred(const QString&)), myErrorDlg, SLOT(addError(const QString&)));