From bb5189f93892bb66d9134a03aeba9cfb841bcda4 Mon Sep 17 00:00:00 2001 From: asv Date: Fri, 5 May 2006 12:27:28 +0000 Subject: [PATCH] Fix to method setDumpPython(). Previous implementation allowed only to SET "DumpPthon" property. Current fix allows also to UNSET "DumpPython" property using this method: if "DumpPython" is already set and this method is called - it will remove the property. It fixes the following bug: when Dump Python is called first with checked, and after that - with unchecked "Save GUI State" checkbox -- the Python script is written with errors as IParameters has internal "DympPython" property set ON (left from the first call). Currently, it is possible to set it OFF, and it is done in SalomeApp_Application::OnDumpPython() function. --- src/SALOMEDS/SALOMEDS_IParameters.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SALOMEDS/SALOMEDS_IParameters.cxx b/src/SALOMEDS/SALOMEDS_IParameters.cxx index 6540d9fee..8bc7ed09f 100644 --- a/src/SALOMEDS/SALOMEDS_IParameters.cxx +++ b/src/SALOMEDS/SALOMEDS_IParameters.cxx @@ -255,7 +255,7 @@ void SALOMEDS_IParameters::setDumpPython(_PTR(Study) study, const string& theID) else anID = theID; _PTR(AttributeParameter) ap = study->GetCommonParameters(anID, 0); - ap->SetBool(_AP_DUMP_PYTHON_, true); + ap->SetBool(_AP_DUMP_PYTHON_, !isDumpPython(study, theID)); } bool SALOMEDS_IParameters::isDumpPython(_PTR(Study) study, const string& theID) -- 2.39.2