Fix changing Variable Name in EditVariablesDialog

This commit is contained in:
Florian Märkl 2019-03-18 20:14:00 +01:00
parent 96f6e062fc
commit dd934443a7

View File

@ -37,9 +37,9 @@ void EditVariablesDialog::applyFields()
Core()->cmdRaw(QString("afvt %1 %2").arg(desc.name).arg(ui->typeComboBox->currentText()));
QString newName = ui->dropdownLocalVars->currentText().replace(" ", "_");
QString newName = ui->nameEdit->text().replace(" ", "_");
if (newName != desc.name) {
Core()->cmdRaw(QString("afvn %1 %2").arg(desc.name).arg(newName));
Core()->cmdRaw(QString("afvn %1 %2").arg(newName).arg(desc.name));
}
// Refresh the views to reflect the changes to vars