Commit 17789a72 authored by Méven Car's avatar Méven Car Committed by Christoph Cullmann
Browse files

Prevent last session to be restored after it was deleted

parent b6adb596
......@@ -264,6 +264,12 @@ bool KateSessionManager::deleteSession(KateSession::Ptr session)
return false;
}
KConfigGroup c(KSharedConfig::openConfig(), "General");
if (c.readEntry("Last Session") == session->name()) {
c.writeEntry("Last Session", QString());
c.sync();
}
QFile::remove(session->file());
m_sessions.remove(session->name());
// Due to this remove from m_sessions will updateSessionList() no signal emit,
......
Markdown is supported
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