refactor: ActionDialog, when filling the screen list continue sooner if screen is null

This commit is contained in:
sithlord48 2025-01-04 19:17:36 -05:00 committed by Nick Bolton
parent 4b456bf835
commit 1129303254

View file

@ -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()
{ {