Patch #990 2006-04-11 21:33

pecan

Preserve editor setting: fix bug 7063
Download
990-Preserve_editor.patch (632 bytes)
Category
 
Status
Accepted
Close date
2006-04-24 18:35
Assigned to
 
Index: src/sdk/editorcolorset.cpp
===================================================================
--- src/sdk/editorcolorset.cpp    (revision 2337)
+++ src/sdk/editorcolorset.cpp    (working copy)
@@ -466,7 +466,8 @@
 {
     wxString key;
     ConfigManager* cfg = Manager::Get()->GetConfigManager(_T("editor"));
-    cfg->DeleteSubPath(_T("/color_sets/") + m_Name);
+    // The next stmt causes all previous user settings to be deleted        //pecan 2006/4/11
+    //-cfg->DeleteSubPath(_T("/color_sets/") + m_Name);                     //pecan 2006/4/11
 
     // write the theme name
     cfg->Write(_T("/color_sets/") + m_Name + _T("/name"), m_Name);
pecan 2006-04-11 21:34

editorcolorset::Save() is deleting all previous user settingsbefore adding the current user editor change.

pecan 2006-04-22 22:51

This will fix bug 7194 also

thomasdenk 2006-04-24 18:35

I've been experimenting with this for a while now, without finding a better solution, so I'll apply the patch as an intermediate solution (though I am still unsure). At least, it makes the program *usable* again :)

When migrating to the new ConfigManager, we were doing massively parallel coding, and Yiannis did the migration for this part so I don't know exactly how this particular bit of configuration is handled.

However, Yiannis explicitely asked me to add a DeleteSubPath() function to ConfigManager, because colour sets and compiler sets would otherwise cause trouble under one condition (had something to do with deleting something).

I don't remember exactly what it was, but I guess we'll find out the hard way :S