diff options
| author | Gleb Kasachou <[email protected]> | 2025-08-28 22:21:39 +0300 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2025-08-30 10:47:46 +0000 |
| commit | 4d6d491a8f1e8cfaa68b71449b2479e468872742 (patch) | |
| tree | d58fed86770e9a825d604468bc36a60725f8cbb3 /src/dolphintabwidget.cpp | |
| parent | 38c9fcd7b6b3c6da790fcade4137b4e9a91bfcc4 (diff) | |
DolphinTabWidget: Use setcurrentIndex() in readProperties()
BUG: 508864
Diffstat (limited to 'src/dolphintabwidget.cpp')
| -rw-r--r-- | src/dolphintabwidget.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/dolphintabwidget.cpp b/src/dolphintabwidget.cpp index 9e332da25..1366eaa55 100644 --- a/src/dolphintabwidget.cpp +++ b/src/dolphintabwidget.cpp @@ -90,30 +90,18 @@ void DolphinTabWidget::saveProperties(KConfigGroup &group) const void DolphinTabWidget::readProperties(const KConfigGroup &group) { - if (m_lastViewedTab) { - m_lastViewedTab->disconnectNavigators(); - m_lastViewedTab = nullptr; - } const int tabCount = group.readEntry("Tab Count", 0); for (int i = 0; i < tabCount; ++i) { if (i >= count()) { openNewActivatedTab(); } const QByteArray state = group.readEntry("Tab Data " % QString::number(i), QByteArray()); - DolphinTabPage *tabPage = tabPageAt(i); - tabPage->connectNavigators(m_navigatorsWidget); - tabPage->restoreState(state); - tabPage->disconnectNavigators(); + setCurrentIndex(i); + tabPageAt(i)->restoreState(state); } const int index = group.readEntry("Active Tab Index", 0); - if (index != currentIndex()) { - setCurrentIndex(index); - } else { - DolphinTabPage *tabPage = tabPageAt(index); - tabPage->connectNavigators(m_navigatorsWidget); - m_lastViewedTab = tabPage; - } + setCurrentIndex(index); } void DolphinTabWidget::refreshViews() |
