Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Kate
Commits
9e6cc0a8
Commit
9e6cc0a8
authored
Sep 23, 2022
by
Christoph Cullmann
🍨
Browse files
guard versus nested restore and save
parent
e703cbae
Pipeline
#236089
passed with stage
in 3 minutes and 50 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
apps/lib/katemdi.cpp
View file @
9e6cc0a8
...
...
@@ -1158,6 +1158,12 @@ 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
)
{
return
;
}
m_sessionRestoreRunning
=
true
;
// show only correct toolviews ;)
for
(
const
auto
&
[
id
,
tv
]
:
m_idToWidget
)
{
tabBar
(
tv
)
->
setTabActive
(
id
,
config
.
readEntry
(
QStringLiteral
(
"Kate-MDI-ToolView-%1-Visible"
).
arg
(
tv
->
id
),
false
));
...
...
@@ -1200,6 +1206,9 @@ void Sidebar::restoreSession(KConfigGroup &config)
});
// ...now we are ready to get the final splitter sizes by MainWindow::finishRestore
updateSidebar
();
// be done, e.g. saveSession is now allowed again
m_sessionRestoreRunning
=
false
;
}
void
Sidebar
::
saveSession
(
KConfigGroup
&
config
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment