Method isValid is redefined to allow other operations is started above this one.

This commit is contained in:
sln 2005-07-12 13:48:12 +00:00
parent 7b1de01a0b
commit 617b2a6106
4 changed files with 44 additions and 0 deletions

View File

@ -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;
}

View File

@ -53,6 +53,7 @@ public:
virtual SalomeApp_Dialog* dlg() const;
void init();
virtual bool isValid( SUIT_Operation* theOtherOp ) const;
protected:
virtual void startOperation();

View File

@ -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;
}

View File

@ -54,6 +54,8 @@ public:
void init();
QString defaultMeshName() const;
virtual bool isValid( SUIT_Operation* theOtherOp ) const;
protected:
virtual void startOperation();
virtual void selectionDone();