From b958a5e3ae0fc2835d0cd56200991e61ae4defac Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Thu, 18 Sep 2014 23:54:15 +0200 Subject: [PATCH] Complement to last commit Do not end up with the sidebar hidden when opening some files and you had it open For example with http://www.abax.se/content/download/137/862/file/example.pdf --- part.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/part.cpp b/part.cpp index f21370b7e..d07bed722 100644 --- a/part.cpp +++ b/part.cpp @@ -1459,7 +1459,7 @@ bool Part::openFile() } // if the 'OpenTOC' flag is set, open the TOC - if ( m_document->metaData( "OpenTOC" ).toBool() && m_sidebar->isItemEnabled( 0 ) && !m_sidebar->isCollapsed() ) + if ( m_document->metaData( "OpenTOC" ).toBool() && m_sidebar->isItemEnabled( 0 ) && !m_sidebar->isCollapsed() && m_sidebar->currentIndex() != 0 ) { m_sidebar->setCurrentIndex( 0, Sidebar::DoNotUncollapseIfCollapsed ); }