summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/Application/DataInputSelectDlg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Authoring/Studio/Application/DataInputSelectDlg.cpp')
-rw-r--r--src/Authoring/Studio/Application/DataInputSelectDlg.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Authoring/Studio/Application/DataInputSelectDlg.cpp b/src/Authoring/Studio/Application/DataInputSelectDlg.cpp
index 9586b97c..6642e04b 100644
--- a/src/Authoring/Studio/Application/DataInputSelectDlg.cpp
+++ b/src/Authoring/Studio/Application/DataInputSelectDlg.cpp
@@ -40,8 +40,11 @@ DataInputSelectDlg::DataInputSelectDlg(QWidget *parent)
}
void DataInputSelectDlg::setData(const QStringList &dataInputList,
- const QString &currentController)
+ const QString &currentController,
+ int handle, int instance)
{
+ m_handle = handle;
+ m_instance = instance;
clear();
setObjectName("DataInputSelectDlg");
setSelectionMode(QAbstractItemView::SingleSelection);
@@ -85,8 +88,9 @@ void DataInputSelectDlg::onItemClicked(QListWidgetItem *item)
void DataInputSelectDlg::onSelectionChanged()
{
- if (currentItem()) {
- Q_EMIT dataInputChanged(currentItem()->text());
+ // Ignore selection changes that happen during setData
+ if (currentItem() && isVisible()) {
+ Q_EMIT dataInputChanged(m_handle, m_instance, currentItem()->text());
hide();
}
}