qlcplus icon indicating copy to clipboard operation
qlcplus copied to clipboard

Refresh Cue List Widget on Addition or Removal of a Step from Chaser

Open lilyCalla opened this issue 1 year ago • 1 comments
trafficstars

  • Currently adding or removing a widget is not reflected in the cue list widget unless the project is saved and reopened
  • Also apparent cause of crash at https://www.qlcplus.org/forum/viewtopic.php?t=17147, as the cue list would attempt to access a non-existent index
  • This PR reloads the chaser cue list if a function is added or removed from the linked chaser, allowing updates to be seen in real time and preventing the crash

lilyCalla avatar May 10 '24 23:05 lilyCalla

Coverage Status

coverage: 32.014% (-0.05%) from 32.065% when pulling 9805f86cc6914dbdc339aea53e2dbdaa3c286a37 on lilyCalla:cuelist-refresh into 01fdda185ed1c008e0605669ec29dac4963511aa on mcallegari:master.

coveralls avatar May 10 '24 23:05 coveralls

Love your work @lilyCalla

yestalgia avatar May 13 '24 07:05 yestalgia

Looks good, thanks 👍

mcallegari avatar May 13 '24 10:05 mcallegari

Actually, I overlooked these changes.

  • first signals should be using past form, so in chaser.h/cpp it's stepsListChanged, not stepListChange
  • also, a signal to update the UI was already present: https://github.com/mcallegari/qlcplus/blob/master/qmlui/virtualconsole/vccuelist.h#L198

I think the only change needed in vccuelist.cpp is this:

connect(function, SIGNAL(stepsListChanged(quint32)),
        this, SIGNAL(stepsListChanged()));

Please try that and re-submit a new PR. Thanks

mcallegari avatar May 13 '24 10:05 mcallegari

Nevermind, I sorted this myself.

mcallegari avatar May 13 '24 16:05 mcallegari