]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
IPAL8927 "Warning" doesn't appear after trying to save animation in the locked study.
authordmv <dmv@opencascade.com>
Tue, 27 Jan 2009 12:50:47 +0000 (12:50 +0000)
committerdmv <dmv@opencascade.com>
Tue, 27 Jan 2009 12:50:47 +0000 (12:50 +0000)
src/VISU_I/VISU_TimeAnimation.cxx

index ed79070dc3580c22b1b58409ff4565a345be068a..3437df86b508ce7af261c8016e571065917d891b 100644 (file)
@@ -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"
@@ -1716,8 +1717,13 @@ std::string GetPresentationComment (VISU::VISUType thePrsType)
 //------------------------------------------------------------------------
 SALOMEDS::SObject_ptr VISU_TimeAnimation::publishInStudy()
 {
-  if (myStudy->GetProperties()->IsLocked())
+  if (myStudy->GetProperties()->IsLocked()) {
+    SUIT_MessageBox::warning(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