Restore the previously open pane in the side toolbox after reloading a watched document.

BUG: 116771

svn path=/branches/KDE/3.5/kdegraphics/kpdf/; revision=656308
remotes/origin/kpdf-3.5
Pino Toscano 19 years ago
parent 075c323495
commit 2d05f9a371
  1. 5
      part.cpp
  2. 1
      part.h

@ -603,6 +603,7 @@ void Part::slotDoFileDirty()
if (m_viewportDirty.pageNumber == -1)
{
m_viewportDirty = m_document->viewport();
m_dirtyToolboxIndex = m_toolBox->currentIndex();
m_wasPresentationOpen = ((PresentationWidget*)m_presentationWidget != 0);
m_pageView->showText(i18n("Reloading the document..."), 0);
}
@ -612,6 +613,10 @@ void Part::slotDoFileDirty()
if (m_viewportDirty.pageNumber >= (int)m_document->pages()) m_viewportDirty.pageNumber = (int)m_document->pages() - 1;
m_document->setViewport(m_viewportDirty);
m_viewportDirty.pageNumber = -1;
if ( m_toolBox->currentIndex() != m_dirtyToolboxIndex && m_toolBox->isItemEnabled( m_dirtyToolboxIndex ) )
{
m_toolBox->setCurrentIndex( m_dirtyToolboxIndex );
}
if (m_wasPresentationOpen) slotShowPresentation();
emit enablePrintAction(true);
}

@ -161,6 +161,7 @@ private:
QTimer *m_dirtyHandler;
DocumentViewport m_viewportDirty;
bool m_wasPresentationOpen;
int m_dirtyToolboxIndex;
// Remember the search history
QStringList m_searchHistory;

Loading…
Cancel
Save