From 10523bf3e5aed24e9b2cc54f3cbd24e87d8bfc4f Mon Sep 17 00:00:00 2001 From: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com> Date: Mon, 31 Dec 2018 16:49:03 -0500 Subject: [PATCH] accounts: fix account deletion navigation Change-Id: I8655b2a5840c81b20b5827cc685790016e648245 --- currentaccountcombobox.cpp | 5 ++++- settingswidget.cpp | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/currentaccountcombobox.cpp b/currentaccountcombobox.cpp index 31031c8..2b47ddb 100644 --- a/currentaccountcombobox.cpp +++ b/currentaccountcombobox.cpp @@ -230,5 +230,8 @@ CurrentAccountComboBox::leaveEvent(QEvent* event) void CurrentAccountComboBox::updateComboBoxDisplay() { - importLabelPhoto(LRCInstance::getCurrentAccountIndex()); + auto currAccIndex = LRCInstance::getCurrentAccountIndex(); + if (currAccIndex != currentIndex()) + setCurrentIndex(currAccIndex); + importLabelPhoto(currAccIndex); } diff --git a/settingswidget.cpp b/settingswidget.cpp index 579c277..b085ae4 100644 --- a/settingswidget.cpp +++ b/settingswidget.cpp @@ -502,9 +502,11 @@ SettingsWidget::delAccountSlot() DeleteAccountDialog delDialog(this); delDialog.exec(); + LRCInstance::setSelectedAccountId(""); if (!LRCInstance::accountModel().getAccountList().size()) { - LRCInstance::setSelectedAccountId(""); emit NavigationRequested(ScreenEnum::WizardScreen); + } else { + emit NavigationRequested(ScreenEnum::CallScreen); } } -- GitLab