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
This commit is contained in:
Albert Astals Cid 2014-09-18 22:24:40 +02:00
parent 3dfd172375
commit d2708aef12

View file

@ -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 );
}