On Thu, 16 Jan 2025 10:29:21 +0100
Kristian Amlie <krist...@amlie.name> wrote:

>On 15.01.2025 18:43, Will Godfrey wrote:
>> On Wed, 15 Jan 2025 15:01:33 +0100
>> Kristian Amlie <krist...@amlie.name> wrote:
>>   
>>> I had to test this a bit before I replied to make sure it would work. In
>>> principle I think it will, but there seems to be a bug in this area:
>>> When I use the menu to load the state, the config is not respected. It
>>> appears to be due to the sessionStage variable being in the wrong state,
>>> so it doesn't enter the "InProgram" section in
>>> Config::extractConfigData. Is this intentional?
>>>  
>> 
>> That's rather odd. Is the change actually being saved?
>> Did you remember that the way we handle loading and saving in config files is
>> that changes are now saved immediately, but to do this we are first loading 
>> the
>> data, making the change, then resaving it.  
>
>Yes, it's saved, that part works. I verified it.
>
>It's the loading that doesn't work. And it doesn't work under LV2 
>either, apparently.
>
>This is turning into more of a hornet's nest than I expected. Let's just 
>put aside the loading problem for a moment, and pretend that this works. 
>Even then, the way that config files are loaded and saved is 
>problematic. If I load a state that contains certain config settings, if 
>I change one config setting afterwards, it will load the one from the 
>config directory instead, not the state, then change that one setting. 
>When I then go to save the state, all settings will have reverted to the 
>settings from the config directory, not the settings that were already 
>in the state.
>
>I knew about the fixes to config saving (not the details though), but I 
>don't remember why this loading-followed-by-saving was introduced. Do 
>you remember?
>
That shouldn't have happened :(
It's supposed to load the config file into a 'detached' area, not the current
one. Change just the one parameter in that area and re-save it to the config
file.

I changed this to resolve two similar problems. The first was to remove the
exit dance we did which involved a similar load+save issue. The second (related)
one was to stop CLI starting arguments becoming permanent changes.

-- 
Will J Godfrey {apparently now an 'elderly'}
https://willgodfrey.bandcamp.com/
http://yoshimi.github.io
Say you have a poem and I have a tune.
Exchange them and we can both have a poem, a tune, and a song.


_______________________________________________
Yoshimi-devel mailing list
Yoshimi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/yoshimi-devel

Reply via email to