mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-16 03:01:27 +05:00
isStudyLocked method fixed. isReadyToStart is constant now
This commit is contained in:
parent
44ff3c5c26
commit
27542bbe52
@ -83,12 +83,11 @@ void SMESHGUI_Operation::startOperation()
|
|||||||
// name : isReadyToStart
|
// name : isReadyToStart
|
||||||
// Purpose : Verify whether operation is ready to start
|
// Purpose : Verify whether operation is ready to start
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
bool SMESHGUI_Operation::isReadyToStart()
|
bool SMESHGUI_Operation::isReadyToStart() const
|
||||||
{
|
{
|
||||||
if ( !SalomeApp_Operation::isReadyToStart() )
|
if ( !SalomeApp_Operation::isReadyToStart() )
|
||||||
return false;
|
return false;
|
||||||
|
else if ( getSMESHGUI() == 0 )
|
||||||
if ( getSMESHGUI() == 0 )
|
|
||||||
{
|
{
|
||||||
SUIT_MessageBox::warn1( desktop(), tr( "SMESH_WRN_WARNING" ),
|
SUIT_MessageBox::warn1( desktop(), tr( "SMESH_WRN_WARNING" ),
|
||||||
tr( "NO_MODULE" ), tr( "SMESH_BUT_OK" ) );
|
tr( "NO_MODULE" ), tr( "SMESH_BUT_OK" ) );
|
||||||
@ -159,3 +158,28 @@ void SMESHGUI_Operation::onCancel()
|
|||||||
void SMESHGUI_Operation::initDialog()
|
void SMESHGUI_Operation::initDialog()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \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::warn1 ( SMESHGUI::desktop(), QObject::tr( "WRN_WARNING" ),
|
||||||
|
QObject::tr( "WRN_STUDY_LOCKED" ), QObject::tr( "BUT_OK" ) );
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -35,12 +35,13 @@ protected:
|
|||||||
virtual void initDialog();
|
virtual void initDialog();
|
||||||
|
|
||||||
virtual void startOperation();
|
virtual void startOperation();
|
||||||
virtual bool isReadyToStart();
|
virtual bool isReadyToStart() const;
|
||||||
|
|
||||||
//! Set according dialog active or inactive
|
//! Set according dialog active or inactive
|
||||||
virtual void setDialogActive( const bool );
|
virtual void setDialogActive( const bool );
|
||||||
|
|
||||||
SMESHGUI* getSMESHGUI() const;
|
SMESHGUI* getSMESHGUI() const;
|
||||||
|
bool isStudyLocked( const bool = true ) const;
|
||||||
|
|
||||||
_PTR(Study) studyDS() const;
|
_PTR(Study) studyDS() const;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user