fix: do add existing aliases to the alias list, correctly remove items in the list before saving
This commit is contained in:
parent
e58c41ac5e
commit
ace44500d0
1 changed files with 4 additions and 1 deletions
|
|
@ -85,6 +85,8 @@ void ScreenSettingsDialog::accept()
|
||||||
|
|
||||||
m_screen->setName(ui->lineNameEdit->text());
|
m_screen->setName(ui->lineNameEdit->text());
|
||||||
|
|
||||||
|
m_screen->aliases().clear();
|
||||||
|
|
||||||
for (int i = 0; i < ui->listAliases->count(); i++) {
|
for (int i = 0; i < ui->listAliases->count(); i++) {
|
||||||
QString alias(ui->listAliases->item(i)->text());
|
QString alias(ui->listAliases->item(i)->text());
|
||||||
if (alias == ui->lineNameEdit->text()) {
|
if (alias == ui->lineNameEdit->text()) {
|
||||||
|
|
@ -95,7 +97,8 @@ void ScreenSettingsDialog::accept()
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_screen->addAlias(alias);
|
if (!m_screen->aliases().contains(alias))
|
||||||
|
m_screen->addAlias(alias);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_screen->setModifier(Shift, ui->comboShift->currentIndex());
|
m_screen->setModifier(Shift, ui->comboShift->currentIndex());
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue