mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-25 02:45:38 +00:00
View orientation cached in memory.
Cache the view orientation in memory to anticipate a document reload. CCBUG: 184518
This commit is contained in:
parent
5be0a98725
commit
a9354072ad
4
part.cpp
4
part.cpp
|
@ -1239,6 +1239,9 @@ void Part::slotDoFileDirty()
|
||||||
// store if presentation view was open
|
// store if presentation view was open
|
||||||
m_wasPresentationOpen = ((PresentationWidget*)m_presentationWidget != 0);
|
m_wasPresentationOpen = ((PresentationWidget*)m_presentationWidget != 0);
|
||||||
|
|
||||||
|
// store the page rotation
|
||||||
|
m_dirtyPageRotation = m_document->rotation();
|
||||||
|
|
||||||
// inform the user about the operation in progress
|
// inform the user about the operation in progress
|
||||||
m_pageView->displayMessage( i18n("Reloading the document...") );
|
m_pageView->displayMessage( i18n("Reloading the document...") );
|
||||||
}
|
}
|
||||||
|
@ -1251,6 +1254,7 @@ void Part::slotDoFileDirty()
|
||||||
m_viewportDirty.pageNumber = (int) m_document->pages() - 1;
|
m_viewportDirty.pageNumber = (int) m_document->pages() - 1;
|
||||||
m_document->setViewport( m_viewportDirty );
|
m_document->setViewport( m_viewportDirty );
|
||||||
m_viewportDirty.pageNumber = -1;
|
m_viewportDirty.pageNumber = -1;
|
||||||
|
m_document->setRotation( m_dirtyPageRotation );
|
||||||
if ( m_sidebar->currentIndex() != m_dirtyToolboxIndex && m_sidebar->isItemEnabled( m_dirtyToolboxIndex ) )
|
if ( m_sidebar->currentIndex() != m_dirtyToolboxIndex && m_sidebar->isItemEnabled( m_dirtyToolboxIndex ) )
|
||||||
{
|
{
|
||||||
m_sidebar->setCurrentIndex( m_dirtyToolboxIndex );
|
m_sidebar->setCurrentIndex( m_dirtyToolboxIndex );
|
||||||
|
|
1
part.h
1
part.h
|
@ -220,6 +220,7 @@ class Part : public KParts::ReadOnlyPart, public Okular::DocumentObserver, publi
|
||||||
int m_dirtyToolboxIndex;
|
int m_dirtyToolboxIndex;
|
||||||
bool m_wasSidebarVisible;
|
bool m_wasSidebarVisible;
|
||||||
bool m_fileWasRemoved;
|
bool m_fileWasRemoved;
|
||||||
|
Rotation m_dirtyPageRotation;
|
||||||
|
|
||||||
// Remember the search history
|
// Remember the search history
|
||||||
QStringList m_searchHistory;
|
QStringList m_searchHistory;
|
||||||
|
|
Loading…
Reference in a new issue