From 2a2c5a48f21e32d4b5232931a4c4a380f547b1ff Mon Sep 17 00:00:00 2001 From: corvid Date: Sun, 17 Jul 2011 21:14:30 +0000 Subject: selection press button 3, don't bother going through most of the link stuff It just had the effect of getting it confused sometimes -- pop up the link menu, and then click elsewhere, and it would select the text between A and B. --- dw/selection.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'dw') diff --git a/dw/selection.cc b/dw/selection.cc index 9702eee0..311c551b 100644 --- a/dw/selection.cc +++ b/dw/selection.cc @@ -94,7 +94,11 @@ bool SelectionState::buttonPress (Iterator *it, int charPos, int linkNo, if (!event) return ret; - if (linkNo != -1) { + if (event->button == 3) { + // menu popup + layout->emitLinkPress (itWidget, linkNo, -1, -1, -1, event); + ret = true; + } else if (linkNo != -1) { // link handling (void) layout->emitLinkPress (itWidget, linkNo, -1, -1, -1, event); resetLink (); @@ -134,10 +138,6 @@ bool SelectionState::buttonPress (Iterator *it, int charPos, int linkNo, toChar = correctCharPos (to, charPos); } ret = true; - } else if (event->button == 3) { - // menu popup - layout->emitLinkPress (itWidget, -1, -1, -1, -1, event); - ret = true; } return ret; -- cgit v1.2.3