From 9d1e1b2ba343cb3202be89ec4e08f90a7fca628e Mon Sep 17 00:00:00 2001 From: 0xd34df00d <0xd34df00d@gmail.com> Date: Sat, 24 May 2014 02:57:14 +0400 Subject: [PATCH] Activate link filters on ctrl+click. --- lib/TerminalDisplay.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/TerminalDisplay.cpp b/lib/TerminalDisplay.cpp index 6100505..774b08b 100644 --- a/lib/TerminalDisplay.cpp +++ b/lib/TerminalDisplay.cpp @@ -1775,6 +1775,17 @@ void TerminalDisplay::mousePressEvent(QMouseEvent* ev) { emit mouseSignal( 0, charColumn + 1, charLine + 1 +_scrollBar->value() -_scrollBar->maximum() , 0); } + + if (ev->modifiers() & Qt::ControlModifier) + { + Filter::HotSpot *spot = _filterChain->hotSpotAt(charLine, charColumn); + if (spot && spot->type() == Filter::HotSpot::Link) + { + QObject action; + action.setObjectName ("open-action"); + spot->activate(&action); + } + } } } else if ( ev->button() == Qt::MidButton )