helge17 / tuxguitar

Improve TuxGuitar and provide builds
Other
489 stars 43 forks source link

fix one scrolling issue #535

Closed guiv42 closed 1 month ago

guiv42 commented 1 month ago

this one was pretty tricky (#534) (bug present since at least TG 1.5.6, not tested before)

test scenario to reproduce issue:

root cause: TGMouseMoveAction and/or TGMouseExitAction are triggered at end of test scenario (because edition mode active). After action is processed, TGUpdateListener.processPostExecution is called, this triggers an update of cached buffer: TGUpdateBuffer.apply, then it calls TGUpdateBuffer.applyUpdateMeasures at this stage, the list of measures to update is empty, because it was cleared by TGUpdateListener.processPreExecution, and no measure changed since. This ends up in Tablature.updateMeasures, with an empty list of measures to update. This method called Caret.update, provoking a scroll back to track1, where caret is since beginning of test scenario.

Fix:

Not 100% sure this will not have any side effect...