View Issue Details

IDProjectCategoryView StatusLast Update
0000249OpenMPTUser Interfacepublic2012-05-14 13:42
Reporterharbinger Assigned ToSaga Musix  
Status resolvedResolutionfixed 
Platformx86OSWindowsOS VersionXP
Product VersionOpenMPT 1.20.01.* (old testing) 
Target VersionOpenMPT (upgrade first) 
Summary0000249: Inconsistent SHIFT-selection behavior when scrolling

While testing the new Shift key fix for plugins, i noticed some odd behaviors when using the Shift key in the PE that i never noticed before.

Click any where in the PE. Now press SHIFT and click another field in the PE. This selects a contiguous block of fields in which to edit. Everything OK so far. Now, WITHOUT RELEASING THE SHIFT KEY, press another field in the PE. Sometimes it will extend the selection, sometimes not -- it will just start a new selection. It ususally does NOT when extending to the right or down, but usually DOES when extending up or to the left.

If you use the arrow keys to navigate your selection extension, it's just as weird and inconsistent. But it becomes apparent that ModPlug is not properly remembering where the last clicked or navigated point was.
When the Shift key is used with Control (my shortcut modifier for moving between individual fields), the selection extension process works fine with the arrow keys. As a matter of fact it works perfectly.

The problem seems to occur with the Shift key alone. And i also tested it with a plugin GUI open and closed.

Additional Information

<blockquote>It has not been fixed, however, for arrow-key selecting, as moving to the left from the cursor and holding Shift does not continue the selection.

That cannot be fixed because, as you surely already noticed, mouse cursor and keyboard cursor selections are independent from each other. That is, making a selection using the keyboard will always use the cursor position as a starting point for the selection, while a mouse selection always uses the first clicked point for that, and keeps the keyboard cursor at the original position.

Shift-selection and normal mouse / keyboard dragging were not meant to be mixed, so I'm not sure if i am going to fix those "trivial anomalies" (they are not really trivial, code-wise).

TagsNo tags attached.
Has the bug occurred in previous versions?
Tested code revision (in case you know it)


Saga Musix

Saga Musix

2012-05-06 18:20

administrator   ~0000709

Last edited: 2012-05-06 18:24

<del>The problem only occours if OpenMPT decides to scroll the pattern.</del> Correction: Scrolling happens after the new point has been clicked already.

Saga Musix

Saga Musix

2012-05-06 18:46

administrator   ~0000710

The code that makes this happen was introduced to avoid conflicts with Shift-Dragging selections. Currently I think the most viable fix would be to only allow Shift-Selections to be made if there is no selection yet.

Saga Musix

Saga Musix

2012-05-06 20:53

administrator   ~0000712

Revision 1265 should fix this - Test to confirm.



2012-05-14 13:25

reporter   ~0000728

Bug has been fixed for mouseclicks in build for the version given above (but of course not in the latest official release); that is, selecting one field, pressing Shift, then clicking in another field, selects the range in all directions.
It has not been fixed, however, for arrow-key selecting, as moving to the left from the cursor and holding Shift does not continue the selection.

Another trivial anomaly: dragging the cursor then pressing Shift, drags from the current cursor location, not the original mousedown selection.

Another trivial limitation: selecting a field, pressing Shift and clicking in another field (this current fix), only selects to the mousedown location; you cannot then extend the selection by dragging that second click. In case you wanted to optimize the behavior...

Issue History

Date Modified Username Field Change
2012-05-06 17:17 harbinger New Issue
2012-05-06 18:20 Saga Musix Note Added: 0000709
2012-05-06 18:20 Saga Musix Summary Inconsistent SHIFT-selection behavior => Inconsistent SHIFT-selection behavior when scrolling
2012-05-06 18:23 Saga Musix Note Edited: 0000709
2012-05-06 18:24 Saga Musix Note Edited: 0000709
2012-05-06 18:46 Saga Musix Note Added: 0000710
2012-05-06 19:08 Saga Musix Assigned To => Saga Musix
2012-05-06 19:08 Saga Musix Status new => assigned
2012-05-06 19:08 Saga Musix Target Version => OpenMPT (upgrade first)
2012-05-06 20:53 Saga Musix Note Added: 0000712
2012-05-06 20:53 Saga Musix Status assigned => feedback
2012-05-14 13:25 harbinger Note Added: 0000728
2012-05-14 13:25 harbinger Status feedback => assigned
2012-05-14 13:42 Saga Musix Status assigned => resolved
2012-05-14 13:42 Saga Musix Resolution open => fixed
2012-05-14 13:42 Saga Musix Additional Information Updated