summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/assistant/tools/assistant/centralwidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/assistant/tools/assistant/centralwidget.cpp b/tools/assistant/tools/assistant/centralwidget.cpp
index 10495ad..d148095 100644
--- a/tools/assistant/tools/assistant/centralwidget.cpp
+++ b/tools/assistant/tools/assistant/centralwidget.cpp
@@ -314,7 +314,7 @@ CentralWidget::~CentralWidget()
}
HelpEngineWrapper &helpEngine = HelpEngineWrapper::instance();
- helpEngine.setLastTabPage(lastTabPage);
+ helpEngine.setLastTabPage(tabWidget->currentIndex());
helpEngine.setLastShownPages(currentPages);
helpEngine.setSearchWasAttached(searchAttached);
helpEngine.setLastZoomFactors(zoomFactors);
@@ -473,7 +473,7 @@ void CentralWidget::setLastShownPages()
const bool searchIsAttached = m_searchWidget->isAttached();
const bool searchWasAttached = helpEngine.searchWasAttached();
int tabToShow = helpEngine.lastTabPage();
- if (searchWasAttached && !searchIsAttached)
+ if (searchWasAttached && !searchIsAttached && tabToShow != 0)
--tabToShow;
else if (!searchWasAttached && searchIsAttached)
++tabToShow;