From kde-commits Mon Sep 30 21:23:13 2013 From: Fabio D'Urso Date: Mon, 30 Sep 2013 21:23:13 +0000 To: kde-commits Subject: [okular] /: Show table of contents in sidebar on startup (if present) Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=138057620215361 Git commit 20716155ecb1e8433476c0e7ff3610613003c29f by Fabio D'Urso, on beh= alf of Stefan Radermacher. Committed on 27/09/2013 at 13:31. Pushed by fabiod into branch 'master'. Show table of contents in sidebar on startup (if present) FEATURE: 321169 FIXED-IN: 4.12.0 REVIEW: 111036 M +4 -0 part.cpp http://commits.kde.org/okular/20716155ecb1e8433476c0e7ff3610613003c29f diff --git a/part.cpp b/part.cpp index 71c3d0f..301d23e 100644 --- a/part.cpp +++ b/part.cpp @@ -1775,6 +1775,10 @@ void Part::updateBookmarksActions() void Part::enableTOC(bool enable) { m_sidebar->setItemEnabled(0, enable); + if ( enable ) + { + m_sidebar->setCurrentIndex( 0 ); + } } = void Part::slotRebuildBookmarkMenu()