[PATCH] Only show the TOC if the sidebar is visible.
Kelvie Wong
kelvie at ieee.org
Wed Feb 3 04:34:24 CET 2010
This is _really_ annoying for users that have the side bar turned off on
documents with a TOC, especially on space-constrained settings.
One has to show the sidebar, click on the "Contents" button to hide the TOC=
,
then re-hide the sidebar to get it to the state where just the PDF is showi=
ng.
It is also unnatural to have the TOC showing without the sidebar, as the TO=
C is
part of the sidebar.
Alternatively, this may be implemented in the Sidebar code, where setting t=
he
current index while hidden does not cause it to appear.
---
okular/part.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/okular/part.cpp b/okular/part.cpp
index 5431d3d..6e520e2 100644
--- a/okular/part.cpp
+++ b/okular/part.cpp
@@ -990,7 +990,7 @@ bool Part::openFile()
}
// if the 'OpenTOC' flag is set, open the TOC
- if ( m_document->metaData( "OpenTOC" ).toBool() &&
m_sidebar->isItemEnabled( 0 ) )
+ if ( m_document->metaData( "OpenTOC" ).toBool() &&
m_sidebar->isItemEnabled( 0 ) && m_sidebar->isSidebarVisible() )
{
m_sidebar->setCurrentIndex( 0 );
}
--
1.6.6.1
--=20
Kelvie Wong
More information about the Okular-devel
mailing list