1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 08:27:46 +00:00

Piano: Fix insertion and deletion of notes

On mouse move the pressed button is not present in the event argument
which causes the corresponding code to never fire. Instead it now stores
the original mouse down event and acts according to that on mouse move.
This commit is contained in:
Florian Kaiser 2023-02-06 20:46:41 +01:00 committed by Jelle Raaijmakers
parent 4ab7216827
commit 815442b2b5
6 changed files with 71 additions and 46 deletions

View file

@ -80,6 +80,7 @@ public:
bool check_processor_chain_valid() const override;
ReadonlySpan<NonnullRefPtr<NoteClip>> notes() const { return m_clips.span(); }
Optional<RollNote> note_at(u32 time, u8 pitch) const;
void set_note(RollNote note);
void remove_note(RollNote note);