User forums => Using Code::Blocks => Topic started by: gd_on on May 23, 2024, 11:51:15 am
Title: How to set a global variable configuration set as the active one at C::B start
Post by: gd_on on May 23, 2024, 11:51:15 am
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.
Title: Re: How to set a global variable configuration set as the active one at C::B start
Post by: Miguel Gimenez on May 23, 2024, 01:59:07 pm
Looks like swapping these two lines from uservardlgs.cpp:473 should do the trick
Title: Re: How to set a global variable configuration set as the active one at C::B start
Post by: gd_on on May 23, 2024, 02:26:54 pm
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 ?
Title: Re: How to set a global variable configuration set as the active one at C::B start
Post by: Miguel Gimenez on May 23, 2024, 04:15:18 pm
Fixed in r13524 (https://sourceforge.net/p/codeblocks/code/13524/), thank you for testing.
The other Save() just collects the members of the current variable, removing the empty ones.