Files
lmms/include
rghvdberg ea295c4ee8 Pianoroll: nudge/snap while dragging notes (#5848)
* pianoroll: nudge/snap while dragging notes

combobox for switching behavior
old behavior (nudge) is default

* snap note start or note end to nearest grid line

* fix member variable name

* change default width of pianoroll

* remove trailing white space

* use mouse position instead of m_draggednote

* Uses enum instead of text for GridMode selection

	To avoid problems with translations breaking the conditional,
PianoRoll::changeSnapMode now uses the value of the ComboBox model,
casted to the GridMode enum instead of the text.

* Fixes last code style issues

	A few code style issues were left, those are fixed in this
commit.

* Removes forgotten comma on enum

	Since the last enum value was commented out, there's an
unnecessary comma left that was removed.

* Rewrites some of the grid logic

	Separates Nudge logic and Snap logic more explicitly.
	Avoids recalculation of mouse conversion to time line ticks.
	Disables shift resizing for Snap mode.
	Removes unnecessary range checks.
	Fixes bug with note key boundary checks (which is present in master).

* Make noteOffset an int instead of TimePos

Co-authored-by: Ian Caio <iancaio_dev@hotmail.com>
2021-03-05 09:38:33 -03:00
..
2020-05-17 11:15:39 +09:00
2018-07-05 20:16:01 +09:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2018-07-07 11:20:54 +02:00
2018-07-07 11:20:54 +02:00
2020-10-10 15:17:25 +09:00
2019-03-16 20:19:27 +01:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2020-02-21 19:26:29 +01:00
2019-10-31 20:05:33 +01:00
2017-12-11 10:46:19 -05:00
2020-09-13 11:09:46 +09:00
2019-10-31 20:05:33 +01:00
2018-07-05 20:16:01 +09:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2018-10-11 19:32:11 +02:00
2020-11-20 15:49:15 +00:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2020-09-13 11:09:46 +09:00
2018-03-09 11:41:17 -05:00
2020-03-11 15:07:02 -04:00
2021-01-23 13:52:36 +01:00
2020-09-13 11:09:46 +09:00
2020-08-11 11:01:58 +02:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2008-07-22 11:36:50 +00:00
2019-10-31 20:05:33 +01:00
2018-07-07 11:20:54 +02:00
2020-04-04 12:08:55 +09:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2018-04-28 12:54:46 -07:00
2018-04-28 12:54:46 -07:00
2020-05-24 12:50:50 +02:00
2020-10-20 10:36:22 +02:00
2020-12-08 00:12:04 +01:00
2020-12-08 00:12:04 +01:00
2020-12-08 00:12:04 +01:00
2020-12-08 00:12:04 +01:00
2020-09-24 17:59:07 +02:00
2020-10-31 13:28:18 +00:00
2019-10-31 20:05:33 +01:00
2020-09-13 11:09:46 +09:00
2018-07-07 11:20:54 +02:00
2019-10-31 20:05:33 +01:00
2017-11-22 20:38:10 +01:00
2019-10-31 20:05:33 +01:00
2020-11-29 19:46:13 +01:00
2019-10-31 20:05:33 +01:00
2017-11-17 09:51:56 -05:00
2019-10-31 20:05:33 +01:00
2020-11-29 19:46:13 +01:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2020-11-29 19:46:13 +01:00
2021-01-23 13:52:36 +01:00
2017-11-22 20:38:10 +01:00
2019-10-31 20:05:33 +01:00
2019-03-27 07:05:38 +09:00
2020-11-29 19:46:13 +01:00
2019-10-31 20:05:33 +01:00
2019-11-15 17:09:57 -05:00
2020-07-28 17:07:35 +02:00
2021-02-26 17:17:16 +05:30
2019-10-31 20:05:33 +01:00
2018-04-03 13:37:25 +02:00
2018-05-06 16:34:08 -07:00
2019-11-15 17:09:57 -05:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2018-07-07 11:20:54 +02:00
2020-08-09 18:01:35 -05:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2019-11-21 14:44:18 +01:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2021-01-23 13:52:36 +01:00
2020-09-13 11:09:46 +09:00
2018-07-07 11:20:54 +02:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2019-10-31 20:05:33 +01:00
2018-04-28 12:54:46 -07:00
2019-10-31 20:05:33 +01:00
2020-11-29 19:46:13 +01:00
2018-05-06 16:34:08 -07:00
2018-07-07 11:20:54 +02:00
2018-07-07 11:20:54 +02:00
2019-10-31 20:05:33 +01:00
2018-07-07 11:20:54 +02:00
2019-10-21 11:18:39 +09:00
2019-11-06 22:06:15 -05:00
2019-03-14 09:44:48 +09:00