Details
-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
Qt Creator 4.8.2
-
None
-
Kubuntu 18.10 x86_64
Description
Unintended drag'n'drop can be really annoying when you're doing code copy/paste with vertical code selection. Here's the typical scenario:
1. Press Alt+Left Mouse Button and select a rectangular piece of code. Copy it with Ctrl+Ins.
2. Move the mouse cursor to a new location.
3. Press Alt+Left Mouse Button and move the mouse vertically to make the cursor multi-line.
4. Press Shift+Ins to paste the previously copied piece of code.
In practice, at step 3 QtCreator changes the recrangular selection area to a line-wise selection starting at the top-left corner of the area selected in step 1 and ending at the point you clicked in step 3. Then, as you're moving the mouse cursor, QtCreator tries to drag the text selected this way and drops it in the location where you released the mouse button.
I think, the conversion of the rectangular selection to a line-wise selection as you click Alt+LMB the second time is a bug. I would expect the selection to be reset when Alt+LMB is clicked, as it is with the normal (line-wise) selection and LMB clicks in code area. As a consequence, drag'n'drop gets activated here erroneously because of that text selection.