diff --git a/src/dialogs/EditVariablesDialog.cpp b/src/dialogs/EditVariablesDialog.cpp index 945c98d9..8d275b44 100644 --- a/src/dialogs/EditVariablesDialog.cpp +++ b/src/dialogs/EditVariablesDialog.cpp @@ -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