summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@qt.io>2018-02-16 14:39:23 +0200
committerTomi Korpipää <tomi.korpipaa@qt.io>2018-02-19 05:24:43 +0000
commit1fd71e93b47df854f3c550190f2bbbf3969c989d (patch)
tree2dbc296217f7f06d826b9225f778d948921d267c /src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp
parent14a03d807f0fee33f194c394258c3f9a59863180 (diff)
Fix crash when changing datainput for text element
Data input connection always used the handle and instance values that were used when the connection was established. Also changed it so that callback from selection dialog only comes when user changes the selection instead of getting one during dialog setup. Task-number: QT3DS-1056 Change-Id: Ic4d6bf78ebba5859f55c69f946bc10d7b8154a06 Reviewed-by: Janne Kangas <janne.kangas@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp')
-rw-r--r--src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp b/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp
index dda980be..d7ecf893 100644
--- a/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp
+++ b/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp
@@ -482,8 +482,7 @@ void InspectorControlView::showDataInputChooser(int handle, int instance, const
if (!m_dataInputChooserView) {
m_dataInputChooserView = new DataInputSelectDlg(g_StudioApp.m_pMainWnd);
connect(m_dataInputChooserView, &DataInputSelectDlg::dataInputChanged, this,
- [this, handle, instance](const QString &controllerName) {
-
+ [this](int handle, int instance, const QString &controllerName) {
bool controlled = controllerName == tr("[No control]") ? false : true;
m_inspectorControlModel
->setPropertyControllerInstance(
@@ -499,8 +498,8 @@ void InspectorControlView::showDataInputChooser(int handle, int instance, const
for (int i = 0; i < g_StudioApp.m_dataInputDialogItems.size(); i++)
dataInputList.append(g_StudioApp.m_dataInputDialogItems[i]->name);
- m_dataInputChooserView->setData(dataInputList,
- m_inspectorControlModel->getCurrentController());
+ m_dataInputChooserView->setData(dataInputList, m_inspectorControlModel->getCurrentController(),
+ handle, instance);
m_dataInputChooserView->showDialog(point);
}