hydrogen-music / hydrogen

The advanced drum machine for Linux, macOS, and Windows
http://www.hydrogen-music.org
GNU General Public License v2.0
1.01k stars 172 forks source link

DPE: update note selection on keyboard input #1871

Closed theGreatWhiteShark closed 9 months ago

theGreatWhiteShark commented 9 months ago

When using the keyboard to select notes the updated selection list was not consistently rendered. Moving up or down was fine. But moving left or right did just alter the size of the selection lasso but did not update the selection of the notes themselves. Or more precisely: the notes were properly selected but the white ellipse highlighting them as selected was not drawn as the background was not touched.

Now, whenever a keyboard event occurs and the selection lasso is active, the background of the DrumPatternEditor will be recreated.

This could of course be done more efficiently, like only redrawing in case the actual selection changes or/and only redraw those spots that changed. Well, maybe some day.

Addresses #1859