From 617b2a610680aad0c1caa7801e83b1b42055da54 Mon Sep 17 00:00:00 2001 From: sln Date: Tue, 12 Jul 2005 13:48:12 +0000 Subject: [PATCH] Method isValid is redefined to allow other operations is started above this one. --- src/SMESHGUI/SMESHGUI_AddSubMeshOp.cxx | 14 +++++++++++++ src/SMESHGUI/SMESHGUI_AddSubMeshOp.h | 1 + src/SMESHGUI/SMESHGUI_InitMeshOp.cxx | 27 ++++++++++++++++++++++++++ src/SMESHGUI/SMESHGUI_InitMeshOp.h | 2 ++ 4 files changed, 44 insertions(+) diff --git a/src/SMESHGUI/SMESHGUI_AddSubMeshOp.cxx b/src/SMESHGUI/SMESHGUI_AddSubMeshOp.cxx index 64da71a7f..1ed50e777 100644 --- a/src/SMESHGUI/SMESHGUI_AddSubMeshOp.cxx +++ b/src/SMESHGUI/SMESHGUI_AddSubMeshOp.cxx @@ -62,6 +62,7 @@ SMESHGUI_AddSubMeshOp::SMESHGUI_AddSubMeshOp() myHypothesisFilter( 0 ), myAlgorithmFilter( 0 ) { + setAutoResumed( true ); } //================================================================================= @@ -357,3 +358,16 @@ SMESH::SMESH_subMesh_var SMESHGUI_AddSubMeshOp::addSubMesh( SMESH::SMESH_Mesh_pt return aSubMesh._retn(); } + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool SMESHGUI_AddSubMeshOp::isValid( SUIT_Operation* theOtherOp ) const +{ + if ( theOtherOp && theOtherOp->inherits( "SMESHGUI_InitMeshOp" ) ) + return true; + else + return false; + +} diff --git a/src/SMESHGUI/SMESHGUI_AddSubMeshOp.h b/src/SMESHGUI/SMESHGUI_AddSubMeshOp.h index a9124eb71..6cbc324ed 100644 --- a/src/SMESHGUI/SMESHGUI_AddSubMeshOp.h +++ b/src/SMESHGUI/SMESHGUI_AddSubMeshOp.h @@ -53,6 +53,7 @@ public: virtual SalomeApp_Dialog* dlg() const; void init(); + virtual bool isValid( SUIT_Operation* theOtherOp ) const; protected: virtual void startOperation(); diff --git a/src/SMESHGUI/SMESHGUI_InitMeshOp.cxx b/src/SMESHGUI/SMESHGUI_InitMeshOp.cxx index 064d8174d..1165258e7 100644 --- a/src/SMESHGUI/SMESHGUI_InitMeshOp.cxx +++ b/src/SMESHGUI/SMESHGUI_InitMeshOp.cxx @@ -60,6 +60,7 @@ SMESHGUI_InitMeshOp::SMESHGUI_InitMeshOp() myHypothesisFilter( 0 ), myAlgorithmFilter( 0 ) { + setAutoResumed( true ); } //================================================================================= @@ -321,3 +322,29 @@ void SMESHGUI_InitMeshOp::onSelectionChanged( int id ) myDlg->clearSelection( id ); } } + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool SMESHGUI_InitMeshOp::isValid( SUIT_Operation* theOtherOp ) const +{ + if ( theOtherOp && theOtherOp->inherits( "SMESHGUI_AddSubMeshOp" ) ) + return true; + else + return false; + +} + + + + + + + + + + + + + diff --git a/src/SMESHGUI/SMESHGUI_InitMeshOp.h b/src/SMESHGUI/SMESHGUI_InitMeshOp.h index 27ce68d1a..f81b776a5 100644 --- a/src/SMESHGUI/SMESHGUI_InitMeshOp.h +++ b/src/SMESHGUI/SMESHGUI_InitMeshOp.h @@ -53,6 +53,8 @@ public: virtual SalomeApp_Dialog* dlg() const; void init(); QString defaultMeshName() const; + + virtual bool isValid( SUIT_Operation* theOtherOp ) const; protected: virtual void startOperation(); -- 2.39.2