-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2022 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
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//=======================================================================
// name : startOperation
-// Purpose : Start opeartion
+// Purpose : Start operation
//=======================================================================
void SMESHGUI_Operation::startOperation()
{
tr( "NO_MODULE" ) );
return false;
}
- else if ( isStudyLocked() )
+ else if ( SMESHGUI::isStudyLocked() )
return false;
return true;
}
-//=======================================================================
-// name : studyDS
-// Purpose :
-//=======================================================================
-_PTR(Study) SMESHGUI_Operation::studyDS() const
-{
- SalomeApp_Study* s = dynamic_cast<SalomeApp_Study*>( study() );
- return s->studyDS();
-}
-
//=======================================================================
// name : onOk
// Purpose :
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
*
* 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