From: dmv Date: Tue, 27 Jan 2009 12:44:26 +0000 (+0000) Subject: IPAL8927 "Warning" doesn't appear after trying to save animation in the locked study. X-Git-Tag: V4_1_0_maintainance_20090206~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=68b1336121771887eead99a3968396e0d6f4e3b5;p=modules%2Fvisu.git IPAL8927 "Warning" doesn't appear after trying to save animation in the locked study. --- diff --git a/src/VISU_I/VISU_TimeAnimation.cxx b/src/VISU_I/VISU_TimeAnimation.cxx index 453cbaa9..1edab8fc 100644 --- a/src/VISU_I/VISU_TimeAnimation.cxx +++ b/src/VISU_I/VISU_TimeAnimation.cxx @@ -61,6 +61,7 @@ #include "SUIT_Application.h" #include "SUIT_Session.h" #include "SUIT_Study.h" +#include "SUIT_MessageBox.h" #include "SALOMEDSClient_AttributeString.hxx" #include "SALOMEDSClient_AttributeName.hxx" @@ -1700,8 +1701,14 @@ std::string GetPresentationComment (VISU::VISUType thePrsType) //------------------------------------------------------------------------ SALOMEDS::SObject_ptr VISU_TimeAnimation::publishInStudy() { - if (myStudy->GetProperties()->IsLocked()) + if (myStudy->GetProperties()->IsLocked()) { + SUIT_MessageBox::warn1(0, + QObject::tr("WRN_VISU_WARNING"), + QObject::tr("WRN_STUDY_LOCKED"), + QObject::tr("BUT_OK")); + return SALOMEDS::SObject::_nil(); + } _PTR(StudyBuilder) aStudyBuilder = myStudy->NewBuilder(); aStudyBuilder->NewCommand(); // There is a transaction