From d2708aef12ba9b5e91a21c92d714fbe29d1a7824 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Thu, 18 Sep 2014 22:24:40 +0200 Subject: [PATCH] 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 a9b841795..f21370b7e 100644 --- a/part.cpp +++ b/part.cpp @@ -1929,7 +1929,7 @@ void Part::enableTOC(bool enable) m_sidebar->setItemEnabled(0, enable); // If present, show the TOC when a document is opened - if ( enable ) + if ( enable && m_sidebar->currentIndex() != 0 ) { m_sidebar->setCurrentIndex( 0, Sidebar::DoNotUncollapseIfCollapsed ); }