Closed davidgritter closed 1 year ago
I think I've fixed the writing of DisplayAsPiston as needed with the latest commit.
@davidgritter No, it's not fixed yet.
It seems that GO will display any divisional (odf and setter) as well as the SetterXXXDivisionalPrevBank and SetterXXXDivisionalNextBank as piston by default. Which means that they should only need to have DisplayAsPiston=N specified in odf.
Also, all the GeneralXX, odf generals, GeneralPrev and GeneralNext also display as piston by default - which again means that they only need to have DisplayAsPiston=N specified in odf.
I'll need to check that GOODF will handle them correctly all the way.
I've made a new commit that should handle things as GO wants it. Please test it.
I tested for the element GeneralNext with code compiled just a few minutes ago. GeneralNext always appears in the main panel as a stopknob, not a piston. I need to manually add the "DisplayAsPiston=Y" to the ODF to get it to display as a piston.
@davidgritter What version of GO are you using? Because on my build from current master the GeneralNext is by default displayed as a piston, which means that in order to get it to show as a drawstop - I need to add DisplayAsPiston=N! Might be something we need to check if it's an issue with GO (and of course adjust GOODF behavior to match whatever the GO behavior is).
Ok. Looking at the commit history of GO, up to 3.9.5-1 the GeneralPrev and GeneralNext was displayed as drawstop by default, and from version 3.10.0-1 they changed to display as piston by default at the same time that the general combinations were corrected. Maybe it should be reverted for just the GeneralPrev and GeneralNext?
I was testing with GO 3.6.? so that explains the problem. Its probably not necessary to support older versions of GO now that so many packaged versions are available, although it should be possible to support all versions by unconditionally writing the "DisplayAsPiston=x" . There may be other similar changes between versions, in which case this would be a huge task. Probably can close the issue, I,ll be testing with 3.11.x from now on.
although it should be possible to support all versions by unconditionally writing the "DisplayAsPiston=x"
Yes, it would indeed work, but it would kind of contradict one of my goals to only write that which is absolutely necessary in the odf.
I've raised an issue for GO (https://github.com/GrandOrgue/grandorgue/issues/1538#issue-1719817515) about the GeneralPrev and GeneralNext so that we can agree upon how we want them to display.
@davidgritter GO is now updated with the default display of GeneralPrev and GeneralNext reverted back to that behavior of GO v3.9.5-1 and earlier. Which means that GO v3.10-3.11 will be displaying it wrong and with next release of GO it will work as before...
I've committed code to GOODF that now should work as GO is intended to work (test with either up to 3.9.5-1 or with 3.12+)!
I created GUI elements for GeneralNext and GeneralPrev and Chose the Display as Piston button 'yes' This allows me to select one of the available piston DispImageNum's, but the Line "DisplayAsPiston=Y" is not written to the ODF for these elements, resulting in a drawknob being shown.