| Summary: | Zoom tool should be cancellable before releasing mouse button | ||
|---|---|---|---|
| Product: | [Unmaintained] kpdf | Reporter: | Jesús Jiménez <jesjimenez> |
| Component: | general | Assignee: | Albert Astals Cid <aacid> |
| Status: | RESOLVED FIXED | ||
| Severity: | wishlist | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Jesús Jiménez
2006-04-27 17:32:06 UTC
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;
|