From: dmv Date: Mon, 24 May 2010 12:39:47 +0000 (+0000) Subject: IPAL21728 TC5.1.4: Problem with saving of locked study X-Git-Tag: translate_resources_09Jul10~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e887341c0af93d4c889389e06c6600ced2e529d8;p=modules%2Fgui.git IPAL21728 TC5.1.4: Problem with saving of locked study --- diff --git a/src/SalomeApp/SalomeApp_VisualState.cxx b/src/SalomeApp/SalomeApp_VisualState.cxx index 689038fa6..0c06d2fd5 100644 --- a/src/SalomeApp/SalomeApp_VisualState.cxx +++ b/src/SalomeApp/SalomeApp_VisualState.cxx @@ -108,6 +108,10 @@ int SalomeApp_VisualState::storeState() if ( !study ) return -1; + // unlock study if it is locked + bool aLocked = study->studyDS()->GetProperties()->IsLocked(); + if (aLocked) study->studyDS()->GetProperties()->SetLocked(false); + int savePoint = 1; std::vector savePoints = study->getSavePoints(); //Calculate a new savePoint number = the last save point number + 1 @@ -182,6 +186,8 @@ int SalomeApp_VisualState::storeState() // set default name of new savePoint study->setNameOfSavePoint( savePoint, QObject::tr( "SAVE_POINT_DEF_NAME" ) + QString::number( savePoint ) ); + if (aLocked) study->studyDS()->GetProperties()->SetLocked(true); + return savePoint; }