X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_Operation.cxx;h=d59c1a0133d4cca547748795845e61809a7c16d9;hp=bf243ff41f3059102af7cda41a1b74c2902302df;hb=refs%2Ftags%2FV9_1_0;hpb=c98d9fcd7f02c1f1f5c24dd3e709ed75228d66c4 diff --git a/src/SMESHGUI/SMESHGUI_Operation.cxx b/src/SMESHGUI/SMESHGUI_Operation.cxx index bf243ff41..d59c1a013 100755 --- a/src/SMESHGUI/SMESHGUI_Operation.cxx +++ b/src/SMESHGUI/SMESHGUI_Operation.cxx @@ -74,7 +74,7 @@ SMESHGUI* SMESHGUI_Operation::getSMESHGUI() const //======================================================================= // name : startOperation -// Purpose : Start opeartion +// Purpose : Start operation //======================================================================= void SMESHGUI_Operation::startOperation() { @@ -122,7 +122,7 @@ bool SMESHGUI_Operation::isReadyToStart() const tr( "NO_MODULE" ) ); return false; } - else if ( isStudyLocked() ) + else if ( SMESHGUI::isStudyLocked() ) return false; return true; @@ -142,16 +142,6 @@ void SMESHGUI_Operation::setDialogActive( const bool active ) } -//======================================================================= -// name : studyDS -// Purpose : -//======================================================================= -_PTR(Study) SMESHGUI_Operation::studyDS() const -{ - SalomeApp_Study* s = dynamic_cast( study() ); - return s->studyDS(); -} - //======================================================================= // name : onOk // Purpose : @@ -236,30 +226,6 @@ bool SMESHGUI_Operation::isApplyAndClose() const return myIsApplyAndClose; } -/*! - * \brief Verifies whether study of operation is locked - * \param theMess - specifies whether message box must be shown if study is locked - * \return State of study. -* -* Verifies whether study of operation is locked. If second parameter is TRUE and study -* is locked when corresponding message box appears -*/ -bool SMESHGUI_Operation::isStudyLocked( const bool theMess ) const -{ - if ( studyDS() ) - { - if ( studyDS()->GetProperties()->IsLocked() ) - { - if ( theMess ) - SUIT_MessageBox::warning( SMESHGUI::desktop(), tr( "WRN_WARNING" ), - tr( "WRN_STUDY_LOCKED" ) ); - return true; - } - } - - return false; -} - /*! * \brief Verifies whether given operator is valid for this one * \param theOtherOp - other operation @@ -267,7 +233,7 @@ bool SMESHGUI_Operation::isStudyLocked( const bool theMess ) const * * Virtual method redefined from base class verifies whether given operator is valid for * this one (i.e. can be started "above" this operator). In current implementation method -* retuns false if theOtherOp operation is not intended for deleting objects or mesh +* returns false if theOtherOp operation is not intended for deleting objects or mesh * elements. */ bool SMESHGUI_Operation::isValid( SUIT_Operation* theOtherOp ) const