X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_Operation.cxx;h=aedcb370669bebe80ea6486efccb7fb97d84d66b;hp=36d78d77b248c52b465e8db4244758a2af17ae8e;hb=0fc0831670e27a5611b941c52dc152fd63964515;hpb=7a65c9fad427b1ccba6b9ccae612296e5092a324 diff --git a/src/SMESHGUI/SMESHGUI_Operation.cxx b/src/SMESHGUI/SMESHGUI_Operation.cxx old mode 100755 new mode 100644 index 36d78d77b..aedcb3706 --- a/src/SMESHGUI/SMESHGUI_Operation.cxx +++ b/src/SMESHGUI/SMESHGUI_Operation.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -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