]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
0052215: TC7.3.0:salome crashes after lock study
authorkga <kga@opencascade.com>
Tue, 10 Dec 2013 06:03:09 +0000 (06:03 +0000)
committerkga <kga@opencascade.com>
Tue, 10 Dec 2013 06:03:09 +0000 (06:03 +0000)
src/GEOMGUI/GeometryGUI.cxx

index ee74a05039e628ee1045d480b4f236cce8ccba98..ddc8c2e7ce86967992ffad192a3e20be64d4e6bd 100644 (file)
@@ -848,6 +848,11 @@ void GeometryGUI::createGeomAction( const int id, const QString& label, const QS
 void GeometryGUI::createOriginAndBaseVectors()
 {
   SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( application()->activeStudy() );
+  bool aLocked = (_PTR(AttributeStudyProperties)(appStudy->studyDS()->GetProperties()))->IsLocked();
+  if ( aLocked ) {
+    SUIT_MessageBox::warning ( application()->desktop(), QObject::tr("WRN_WARNING"), QObject::tr("WRN_STUDY_LOCKED") );
+    return;
+  }
   if ( appStudy ) {
     _PTR(Study) studyDS = appStudy->studyDS();
     if ( studyDS && !CORBA::is_nil( GetGeomGen() ) ) {