Summary: | [patch] Don't always switch to thumbnail view on reload | ||
---|---|---|---|
Product: | [Unmaintained] kpdf | Reporter: | Mary Ellen Foster <mefoster> |
Component: | general | Assignee: | Albert Astals Cid <aacid> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | kde-bugs, rpetrick |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Mary Ellen Foster
2005-11-20 15:48:58 UTC
That's a bad solution because closing the document only (i know you can not do it from the ui, but it can be done), would leave the contents tab enabled. I will see if i find time to fix it. I would also like to see this feature implemented. In general, on reload (especially on "watch file" reload), the state of the program should be preserved as much as possible. In case of the "Contents" panel, this means that it should stay open, it should preserve the "expanded/collapsed" state as much as possible, etc. P.S. Re: comment #2. I am not very qualified here, but what is wrong with keeping the contents tab enabled when there is no document opened - why would anybody care which tab happens to be enabled at this point? SVN commit 656308 by pino: Restore the previously open pane in the side toolbox after reloading a watched document. BUG: 116771 M +5 -0 part.cpp M +1 -0 part.h --- branches/KDE/3.5/kdegraphics/kpdf/part.cpp #656307:656308 @@ -603,6 +603,7 @@ 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 @@ 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); } --- branches/KDE/3.5/kdegraphics/kpdf/part.h #656307:656308 @@ -161,6 +161,7 @@ QTimer *m_dirtyHandler; DocumentViewport m_viewportDirty; bool m_wasPresentationOpen; + int m_dirtyToolboxIndex; // Remember the search history QStringList m_searchHistory; |