mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2025-03-14 13:20:59 +00:00
NOISSUE make newly added account be the default one if there's no default yet
This commit is contained in:
parent
43f59f2d91
commit
a484024b9e
@ -600,10 +600,12 @@ void AccountsDialog::onLoginTaskSucceeded()
|
||||
{
|
||||
m_loginTask = nullptr;
|
||||
QModelIndex index = m_accounts->addAccount(m_loginAccount);
|
||||
if (m_accounts->count() == 2) {
|
||||
m_accounts->setDefaultAccount(m_loginAccount);
|
||||
}
|
||||
|
||||
ui->accountListView->selectionModel()->select(index, selectionFlags);
|
||||
if(!m_accounts->defaultAccount())
|
||||
{
|
||||
m_accounts->setData(index, Qt::Checked, Qt::CheckStateRole);
|
||||
}
|
||||
m_loginAccount = nullptr;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user