User forums > Using Code::Blocks

How to set a global variable configuration set as the active one at C::B start

(1/1)

gd_on:
I have several global variable configuration set, for example : default, set_1, set_2, ...
When I open codeblocks, look at Global Variables... I see, for example that set_1 is Active, the one selected in the scroll-down menu.
I do some work with that set_1, then choose the set_2, clic on the Save button at the bottom, do some work with set_2, always inside codeblocks. Then I close codeblocks.
When I reopen codeblocks, and look at the global variable config, I see it's still set_1 which is selected.
How to make codeblocks to keep my set_2 config as the active set after a restart. I can modify default.conf manually, of course.
I thought that the Save button at the bottom of the global variable configuration display box was for that purpose, but it's not the case apparently.

Miguel Gimenez:
Looks like swapping these two lines from uservardlgs.cpp:473 should do the trick

--- Code: ---    m_UserVarMgr->Save();
    m_UserVarMgr->SetActiveSetName(m_CurrentSetName);

--- End code ---
but I cannot check right now

gd_on:
Effectively, with this line switch, it works as I thought it should...
Nevertheless, there is another Save() at line 471, a more global one I suppose. What does it save ?

Miguel Gimenez:
Fixed in r13524, thank you for testing.

The other Save() just collects the members of the current variable, removing the empty ones.

Navigation

[0] Message Index

Go to full version