From 226e5fc71660fd5a5dec8b94415ce00221efd755 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 11 Oct 2015 09:55:07 +0200 Subject: Fix setting curWMSession when used previous type of session in TDM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- tdm/kfrontend/kgreeter.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tdm/kfrontend/kgreeter.cpp') diff --git a/tdm/kfrontend/kgreeter.cpp b/tdm/kfrontend/kgreeter.cpp index 3fdbc6042..e2791d43a 100644 --- a/tdm/kfrontend/kgreeter.cpp +++ b/tdm/kfrontend/kgreeter.cpp @@ -758,15 +758,18 @@ KGreeter::slotLoadPrevWM() } } - for (uint i = 0; i < sessionTypes.count() && !sessionTypes[i].hid; i++) + for (uint i = 0; i < sessionTypes.count() && !sessionTypes[i].hid; i++) { if (sessionTypes[i].type == sess) { free( sess ); setPrevWM( i ); + curWMSession = sessionTypes[i].type.utf8(); return; } - if (curSel == -1) + } + if (curSel == -1) { MsgBox( sorrybox, i18n("Your saved session type '%1' is not valid any more.\n" "Please select a new one, otherwise 'default' will be used.").arg( sess ) ); + } free( sess ); prevValid = false; } -- cgit v1.2.1