From 0ff5fa2cd5ce684ca3a9164cf897e5060c5a7c9a Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 19 Jul 2009 01:16:31 +0000 Subject: When both Ctrl and Shift down when mouse pressed, prioritise Shift so that current selection is extended rather than allowing creation of a new empty selection. --- src/Editor.cxx | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index 929db7d66..3085bd6ec 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -5639,16 +5639,18 @@ void Editor::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, b SetMouseCapture(true); if (inDragDrop != ddInitial) { SetDragPosition(SelectionPosition(invalidPosition)); - if (ctrl && multipleSelection) { - InvalidateSelection(SelectionRange(newPos), true); - sel.AddSelection(newPos); - } else if (!shift) { - InvalidateSelection(SelectionRange(newPos), true); - if (sel.Count() > 1) - Redraw(); - sel.Clear(); - sel.selType = alt ? Selection::selRectangle : Selection::selStream; - SetSelection(newPos, newPos); + if (!shift) { + if (ctrl && multipleSelection) { + InvalidateSelection(SelectionRange(newPos), true); + sel.AddSelection(newPos); + } else { + InvalidateSelection(SelectionRange(newPos), true); + if (sel.Count() > 1) + Redraw(); + sel.Clear(); + sel.selType = alt ? Selection::selRectangle : Selection::selStream; + SetSelection(newPos, newPos); + } } sel.selType = alt ? Selection::selRectangle : Selection::selStream; selectionType = selChar; -- cgit v1.2.3