Commit 6daa2d96 authored by loh tar's avatar loh tar
Browse files

Sidebar: Set session restore flag at correct place

BUG:459108
parent 448555fe
Pipeline #236655 passed with stage
in 6 minutes and 15 seconds
......@@ -1135,6 +1135,12 @@ void Sidebar::updateLastSize()
void Sidebar::startRestoreSession(KConfigGroup &config)
{
// ensure we only run once and we don't start a saveSession in addition
if (m_sessionRestoreRunning) {
return;
}
m_sessionRestoreRunning = true;
// Using splitter data avoid to store tabBarCount explicit ;-)
QList<int> s = config.readEntry(QStringLiteral("Kate-MDI-Sidebar-%1-Splitter").arg(position()), QList<int>());
// Notice the start value of 1, only add extra tab bars
......@@ -1158,11 +1164,10 @@ void Sidebar::startRestoreSession(KConfigGroup &config)
void Sidebar::restoreSession(KConfigGroup &config)
{
// ensure we only run once and we don't start a saveSession in addition
if (m_sessionRestoreRunning) {
// Only continue when restore was started properly
if (!m_sessionRestoreRunning) {
return;
}
m_sessionRestoreRunning = true;
// show only correct toolviews ;)
for (const auto &[id, tv] : m_idToWidget) {
......
Supports Markdown
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