Commit 10523bf3 authored by Andreas Traczyk's avatar Andreas Traczyk

accounts: fix account deletion navigation

Change-Id: I8655b2a5840c81b20b5827cc685790016e648245
parent a3b984f0
......@@ -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);
}
......@@ -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);
}
}
......
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