[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdegraphics/kpdf/ui
From: Pino Toscano <toscano.pino () tiscali ! it>
Date: 2006-10-29 12:00:44
Message-ID: 1162123244.814983.343.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 600007 by pino:
Cancel selecting when Esc is pressed.
BUG: 126359
M +11 -2 pageview.cpp
--- branches/KDE/3.5/kdegraphics/kpdf/ui/pageview.cpp #600006:600007
@@ -574,7 +574,7 @@
e->accept();
// if performing a selection or dyn zooming, disable keys handling
- if ( !d->mouseSelectionRect.isNull() || d->mouseMidStartY != -1 )
+ if ( ( !d->mouseSelectionRect.isNull() && e->key() != Qt::Key_Escape ) || d->mouseMidStartY != -1 )
return;
// handle 'find as you type' (based on khtml/khtmlview.cpp)
@@ -711,6 +711,15 @@
case Key_Right:
horizontalScrollBar()->addLine();
break;
+ case Qt::Key_Escape:
+ selectionClear();
+ d->mousePressPos = QPoint();
+ if ( d->aPrevAction )
+ {
+ d->aPrevAction->activate();
+ d->aPrevAction = 0;
+ }
+ break;
case Key_Shift:
case Key_Control:
if ( d->autoScrollTimer )
@@ -810,7 +819,7 @@
case MouseZoom:
case MouseSelect:
// set second corner of selection
- if ( leftButton || d->aPrevAction )
+ if ( !d->mousePressPos.isNull() && ( leftButton || d->aPrevAction ) )
selectionEndPoint( e->x(), e->y() );
break;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic