Fix bug 106546, Jakubs that is who made the code don't see why it should be there if without it vim-like search still works

svn path=/trunk/KDE/kdegraphics/kpdf/; revision=421280
remotes/origin/kpdf
Albert Astals Cid 21 years ago
parent be052853fa
commit 00795e5d73
  1. 8
      ui/pageview.cpp

@ -588,12 +588,12 @@ void PageView::keyPressEvent( QKeyEvent * e )
{ {
// part doesn't get this key event because of the keyboard grab // part doesn't get this key event because of the keyboard grab
d->findTimeoutTimer->stop(); // restore normal operation during possible messagebox is displayed d->findTimeoutTimer->stop(); // restore normal operation during possible messagebox is displayed
releaseKeyboard(); //releaseKeyboard();
if ( d->document->continueSearch( PAGEVIEW_SEARCH_ID ) ) if ( d->document->continueSearch( PAGEVIEW_SEARCH_ID ) )
d->messageWindow->display( i18n("Text found: \"%1\".").arg(d->typeAheadString.lower()), d->messageWindow->display( i18n("Text found: \"%1\".").arg(d->typeAheadString.lower()),
PageViewMessage::Find, 3000 ); PageViewMessage::Find, 3000 );
d->findTimeoutTimer->start( 3000, true ); d->findTimeoutTimer->start( 3000, true );
grabKeyboard(); // grabKeyboard();
} }
// esc and return: end search // esc and return: end search
else if( e->key() == Key_Escape || e->key() == Key_Return ) else if( e->key() == Key_Escape || e->key() == Key_Return )
@ -632,7 +632,7 @@ void PageView::keyPressEvent( QKeyEvent * e )
connect( d->findTimeoutTimer, SIGNAL( timeout() ), this, SLOT( findAheadStop() ) ); connect( d->findTimeoutTimer, SIGNAL( timeout() ), this, SLOT( findAheadStop() ) );
} }
d->findTimeoutTimer->start( 3000, true ); d->findTimeoutTimer->start( 3000, true );
grabKeyboard(); // grabKeyboard();
return; return;
} }
@ -1845,7 +1845,7 @@ void PageView::findAheadStop()
d->typeAheadActive = false; d->typeAheadActive = false;
d->typeAheadString = ""; d->typeAheadString = "";
d->messageWindow->display( i18n("Find stopped."), PageViewMessage::Find, 1000 ); d->messageWindow->display( i18n("Find stopped."), PageViewMessage::Find, 1000 );
releaseKeyboard(); //releaseKeyboard();
} }
void PageView::slotZoom() void PageView::slotZoom()

Loading…
Cancel
Save