RemoteDialog: Fix button states after adding remote

As adding a remote leads to a model reset which does not
trigger the selectionChanged signal, all buttons were
enabled despite no remote was selected.

Change-Id: I2f752fcf5f1830728d1bcf9810ca4648bd2f287b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Andre Hartmann
2021-09-28 13:45:39 +02:00
committed by André Hartmann
parent 23a58a320e
commit 2dfb9ff539
3 changed files with 6 additions and 0 deletions

View File

@@ -145,6 +145,8 @@ RemoteDialog::RemoteDialog(QWidget *parent) :
connect(m_ui->remoteView->selectionModel(), &QItemSelectionModel::selectionChanged,
this, &RemoteDialog::updateButtonState);
connect(m_remoteModel, &RemoteModel::refreshed,
this, &RemoteDialog::updateButtonState);
updateButtonState();
}