refactor: ActionDialog, when filling the screen list continue sooner if screen is null
This commit is contained in:
parent
4b456bf835
commit
1129303254
1 changed files with 10 additions and 10 deletions
|
|
@ -66,7 +66,8 @@ ActionDialog::ActionDialog(QWidget *parent, const ServerConfig &config, Hotkey &
|
||||||
|
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
for (const Screen &screen : config.screens()) {
|
for (const Screen &screen : config.screens()) {
|
||||||
if (!screen.isNull()) {
|
if (screen.isNull())
|
||||||
|
continue;
|
||||||
QListWidgetItem *pListItem = new QListWidgetItem(screen.name());
|
QListWidgetItem *pListItem = new QListWidgetItem(screen.name());
|
||||||
ui->m_pListScreens->addItem(pListItem);
|
ui->m_pListScreens->addItem(pListItem);
|
||||||
if (m_Action.typeScreenNames().indexOf(screen.name()) != -1)
|
if (m_Action.typeScreenNames().indexOf(screen.name()) != -1)
|
||||||
|
|
@ -79,7 +80,6 @@ ActionDialog::ActionDialog(QWidget *parent, const ServerConfig &config, Hotkey &
|
||||||
idx++;
|
idx++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void ActionDialog::accept()
|
void ActionDialog::accept()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue