PAL10953. Add switchToOperation()

This commit is contained in:
eap 2006-01-13 09:53:11 +00:00
parent 65cd714f90
commit ce2513eb44
2 changed files with 15 additions and 0 deletions

View File

@ -3083,6 +3083,20 @@ LightApp_Operation* SMESHGUI::createOperation( const int id ) const
return op;
}
//================================================================================
/*!
* \brief Stops current operations and starts a given one
* \param id - The id of the operation to start
*/
//================================================================================
void SMESHGUI::switchToOperation(int id)
{
if ( _PTR(Study) aStudy = SMESH::GetActiveStudyDocument() )
activeStudy()->abortAllOperations();
startOperation( id );
}
LightApp_Displayer* SMESHGUI::displayer()
{
if( !myDisplayer )

View File

@ -83,6 +83,7 @@ public :
void ResetState() ;
void SetState(int aState) ;
bool DefineDlgPosition(QWidget* aDlg, int& x, int& y) ;
void switchToOperation(int id) ;
virtual bool OnGUIEvent ( int id );
virtual bool OnMousePress ( QMouseEvent*, SUIT_ViewWindow* );