mirror of
https://invent.kde.org/graphics/okular
synced 2024-10-05 23:49:20 +00:00
Forwardport of SVN commit 656308 by pino:
Restore the previously open pane in the side toolbox after reloading a watched document. (closed KPDF #116771) svn path=/trunk/KDE/kdegraphics/okular/; revision=656309
This commit is contained in:
parent
6cf46e9160
commit
bf9f5c6fa8
7
part.cpp
7
part.cpp
|
@ -879,6 +879,9 @@ void Part::slotDoFileDirty()
|
|||
// store the current viewport
|
||||
m_viewportDirty = m_document->viewport();
|
||||
|
||||
// store the current toolbox pane
|
||||
m_dirtyToolboxIndex = m_toolBox->currentIndex();
|
||||
|
||||
// store if presentation view was open
|
||||
m_wasPresentationOpen = ((PresentationWidget*)m_presentationWidget != 0);
|
||||
|
||||
|
@ -894,6 +897,10 @@ void Part::slotDoFileDirty()
|
|||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue