summaryrefslogtreecommitdiffstats
path: root/src/Authoring
diff options
context:
space:
mode:
Diffstat (limited to 'src/Authoring')
-rw-r--r--src/Authoring/Studio/Application/DataInputListDlg.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Authoring/Studio/Application/DataInputListDlg.cpp b/src/Authoring/Studio/Application/DataInputListDlg.cpp
index 238e3f3f..401ddee4 100644
--- a/src/Authoring/Studio/Application/DataInputListDlg.cpp
+++ b/src/Authoring/Studio/Application/DataInputListDlg.cpp
@@ -319,8 +319,16 @@ void CDataInputListDlg::onEditDataInput()
CDataInputDlg datainputdialog(&di, m_tableContents, this, allowedTypes);
datainputdialog.exec();
- // insert replaces the previous key - value pair
+ // if we are renaming a datainput, remove the old key - value and
+ // add it again as new entry with new name
+ if (m_currentDataInputName != di->name) {
+ m_dataInputs.remove(m_currentDataInputName);
+ m_currentDataInputName = di->name;
+ }
+
+ // insert replaces the previous key - value pair if existing
m_dataInputs.insert(m_currentDataInputName, di);
+
updateButtons();
updateContents();