From e887341c0af93d4c889389e06c6600ced2e529d8 Mon Sep 17 00:00:00 2001 From: dmv Date: Mon, 24 May 2010 12:39:47 +0000 Subject: [PATCH] IPAL21728 TC5.1.4: Problem with saving of locked study --- src/SalomeApp/SalomeApp_VisualState.cxx | 6 ++++++ 1 file changed, 6 insertions(+) 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; } -- 2.39.2