OnImportFromFile()
{
if(MYDEBUG) MESSAGE("VisuGUI::OnImportFromFile()");
- CheckLock(GetCStudy(GetAppStudy(this)));
+ if ( CheckLock(GetCStudy(GetAppStudy(this))) )
+ return;
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
QStringList aFilter;
{
if(MYDEBUG) MESSAGE("VisuGUI::OnExploreMEDFile()");
_PTR(Study) aStudy = GetCStudy(GetAppStudy(this));
- CheckLock(aStudy);
+ if ( CheckLock(aStudy) )
+ return;
SALOME_MED::MED_Gen_var aGen = GetMEDEngine();
OnImportTableFromFile()
{
if(MYDEBUG) MESSAGE("VisuGUI::OnImportTableFromFile()");
- CheckLock(GetCStudy(GetAppStudy(this)));
+ if ( CheckLock(GetCStudy(GetAppStudy(this))) )
+ return;
QStringList aFilter;
aFilter.append( tr("FLT_TABLE_FILES") );
CheckLock( _PTR(Study) theStudy )
{
if(IsStudyLocked(theStudy))
- throw std::runtime_error(QObject::tr("WRN_STUDY_LOCKED").latin1());
+ {
+ SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>
+ (SUIT_Session::session()->activeApplication());
+ if (anApp)
+ {
+ SUIT_MessageBox::warn1(anApp->desktop(),
+ QObject::tr("WRN_VISU_WARNING"),
+ QObject::tr("WRN_STUDY_LOCKED"),
+ QObject::tr("BUT_OK"));
+ return true;
+ }
+ }
return false;
}