[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/work/kviewshell-0.7/kviewshell/plugins/dvi
From:       Wilfried Huss <Wilfried.Huss () gmx ! at>
Date:       2006-02-28 20:55:22
Message-ID: 1141160122.490250.10643.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 514613 by whuss:

Port of commit 514606

Control + Left Click" for source hyperlinks.
"Middle Click" still works of course.

fixes bug #122791

 M  +7 -4      dviWidget.cpp  


--- branches/work/kviewshell-0.7/kviewshell/plugins/dvi/dviWidget.cpp #514612:514613
@@ -28,9 +28,6 @@
 
 void DVIWidget::mousePressEvent(QMouseEvent* e)
 {
-  // Call implementation from parent
-  DocumentWidget::mousePressEvent(e);
-
   // Safety check
   if (!pageNumber.isValid())
     return;
@@ -44,7 +41,10 @@
   }
 
   // Check if the mouse is pressed on a source-hyperlink
-  if ((e->button() == MidButton) && (pageData->sourceHyperLinkList.size() > 0))
+  // source hyperlinks can be invoked with the Middle Mousebutton or alternatively
+  // with Control+Left Mousebutton
+  if ((e->button() == MidButton || (e->button() == LeftButton && (e->state() & ControlButton)))
+      && (pageData->sourceHyperLinkList.size() > 0))
   {
     int minIndex = 0;
     int minimum = 0;
@@ -71,6 +71,9 @@
     emit(SRCLink(pageData->sourceHyperLinkList[minIndex].linkText, inverseMap(e->pos()), this));
     e->accept();
   }
+
+  // Call implementation from parent
+  DocumentWidget::mousePressEvent(e);
 }
 
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic