Fix piano roll not updating after pitch bend node value change#8414
Fix piano roll not updating after pitch bend node value change#8414alexandra-russell wants to merge 1 commit into
Conversation
fineTuneValue() in AutomationEditor directly sets node inValue/outValue via AutomationNode::setInValue/setOutValue, which recalculate tangents but do not emit dataChanged(). The piano roll is connected to dataChanged() on the detuning AutomationClip, so it never received the repaint signal and showed a stale pitch bend line until hovered. Fix: emit dataChanged() on the clip after the node value is set. AutomationEditor is already a declared friend of AutomationClip, so it has access to the protected signal. Fixes LMMS#7675
regulus79
left a comment
There was a problem hiding this comment.
I haven't tested, but the fix looks fine. It seems that when normally editing an automation clip, AutomationClip::setDragValue which called AutomationClip::putValue calls emit dataChanged(), but here when double-clicking and entering a value, it directly edits the value of that node, bypassing those functions, which means dataChanged is never emitted.
|
Can you reproduce the bug this fixes (#7675) on the latest nightly? I tried reproducing it, but the piano roll updated correctly even when double clicking in the automation editor. It looks like |
Summary
Fixes #7675. When double-clicking a pitch bend node in the Automation Editor to change its value, the Piano Roll did not update until the cursor hovered over it.
Root cause
fineTuneValue()changes node values directly viaAutomationNode::setInValue()/setOutValue(). Those methods recalculate tangents but do not emitdataChanged(). The Piano Roll's repaint is wired toAutomationClip::dataChanged()(connected when the detuning curve is created), so it never received a signal to redraw.By contrast, dragging nodes goes through
AutomationClip::putValue(), which does emitdataChanged()-- this is why dragging works but double-click did not.Fix
Emit
dataChanged()on the clip at the end offineTuneValue(), after the node value is set.AutomationEditoris already a declared friend ofAutomationClip, so it has access to the protected signal.Test plan