Commit b34e0954 authored by Amin Bandali's avatar Amin Bandali Committed by Sébastien Blin
Browse files

mainwindow: fix wrong account selected in combo box in some cases

When account is at the top of the list in the account combo box and
it is disabled, quitting the application and relaunching it results
in that disabled account being wrongly selected in the combo box.
This fixes that.

GitLab: #1212
Change-Id: If286655ff61e50d2d1c6c4a24a66231f5aef70c3
parent 9065ba0b
......@@ -1430,8 +1430,14 @@ CppImpl::init()
/* init chat webkit container so that it starts loading before the first time we need it*/
// setup account selector and select the first account
// set up account selector
if (!activeAccountId.isEmpty()) {
// if there is a non-disabled account, select the first such account
refreshAccountSelectorWidget(-1, activeAccountId.toStdString());
} else if(!accountIds.isEmpty()) {
// all accounts are disabled, select the first account
auto* renderer = gtk_cell_renderer_pixbuf_new();
gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(widgets->combobox_account_selector), renderer, true);
Supports Markdown
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