Remove artifact while navigating though pages

When the view is paged (ie, non continuous), and an annotation is
selected while the user navigate through pages, the annotation
selection will become an artifact in other pages. Besides that,
the annotation will still receive keystrokes (such as delete).

Steps to Reproduce:
 - Open a PDF file with Okular
 - Draw an ellipsis annotation in the document
 - Select the ellipsis
 - Change to the previous or next page
remotes/origin/work/aacid/shorcutslost_2008
Pedro Arthur Pinheiro Rosa Duarte 6 years ago committed by David Hurka
parent 4da86fb8de
commit 5d947905f7
  1. 8
      ui/pageview.cpp

@ -1427,6 +1427,14 @@ void PageView::notifyCurrentPageChanged(int previous, int current)
}
}
}
// if the view is paged (or not continuous) and there is a selected annotation,
// we call reset to avoid creating an artifact in the next page.
if (!Okular::Settings::viewContinuous()) {
if (d->mouseAnnotation && d->mouseAnnotation->isFocused()) {
d->mouseAnnotation->reset();
}
}
}
// END DocumentObserver inherited methods

Loading…
Cancel
Save