Salome HOME
Copyright update 2020
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_Operation.cxx
old mode 100755 (executable)
new mode 100644 (file)
index 36d78d7..aedcb37
@@ -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<SalomeApp_Study*>( 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