vassalengine / vassal

VASSAL, the open-source boardgame engine
https://vassalengine.org
GNU Lesser General Public License v2.1
439 stars 105 forks source link

Nested toolbar buttons are wrongly disabled in Vassal 3.6.15 #12180

Open riverwanderer opened 1 year ago

riverwanderer commented 1 year ago

This issue showed up after a fix to #12093 that was released in Vassal v3.6.15.

To demo, use C&C Nap module Version v4.1.8. Start scenario as Solitaire, select a deck combo, then open a hand window; observe that buttons in a level2 nested Toolbar Menu are now locked (all these buttons are controlled by a GP that is set FALSE at this point). Illustrated below:

image

Other testing suggests a hypothesis that the issue relates to refreshing of the enabled/disabled button state after game startup (SGKCs) have completed.

Later versions of Vassal (v3.7) show a different issue with the identical module / buttons (#12179 )

riverwanderer commented 1 year ago

Demo module that walks through an example of the issue as it manifested in game save (runs under Vassal v3.7):

12180.zip

riverwanderer commented 1 year ago

This variant of the demo shows what happens when the disabled status is initialised as "true". Note, as with the first example, all Properties are module-level and should not depend on a game being started. 12180-2.zip

The first thing to note about this demo is the "UNLOCKED" button before a game is started. This button should start as disabled. It does not. Nor does it respond to changes in the controlling GP (controlGP) which are effected via the ON/OFF buttons. This may be a separate issue but it seems related, at least prior to a game starting.

Start a game to look at the effect on the SubMenu button in more detail. It starts enabled, contrary to the value of controlGP (which now IS reflected correctly in the "UNLOCKED" button. Follow the instructions once the new game starts.