Commit b958a5e3 authored by Albert Astals Cid's avatar Albert Astals Cid

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
parent d2708aef
......@@ -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 );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment