Commit a9354072 authored by Christopher Reichert's avatar Christopher Reichert

View orientation cached in memory.

Cache the view orientation in memory to anticipate
a document reload.

CCBUG: 184518
parent 5be0a987
......@@ -1239,6 +1239,9 @@ void Part::slotDoFileDirty()
// store if presentation view was open
m_wasPresentationOpen = ((PresentationWidget*)m_presentationWidget != 0);
// store the page rotation
m_dirtyPageRotation = m_document->rotation();
// inform the user about the operation in progress
m_pageView->displayMessage( i18n("Reloading the document...") );
}
......@@ -1251,6 +1254,7 @@ void Part::slotDoFileDirty()
m_viewportDirty.pageNumber = (int) m_document->pages() - 1;
m_document->setViewport( m_viewportDirty );
m_viewportDirty.pageNumber = -1;
m_document->setRotation( m_dirtyPageRotation );
if ( m_sidebar->currentIndex() != m_dirtyToolboxIndex && m_sidebar->isItemEnabled( m_dirtyToolboxIndex ) )
{
m_sidebar->setCurrentIndex( m_dirtyToolboxIndex );
......
......@@ -220,6 +220,7 @@ class Part : public KParts::ReadOnlyPart, public Okular::DocumentObserver, publi
int m_dirtyToolboxIndex;
bool m_wasSidebarVisible;
bool m_fileWasRemoved;
Rotation m_dirtyPageRotation;
// Remember the search history
QStringList m_searchHistory;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment