summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@qt.io>2018-06-12 14:36:18 +0300
committerMiikka Heikkinen <miikka.heikkinen@qt.io>2018-06-12 12:08:42 +0000
commitc39d3e96e6e8725207eda830b9b5660bd2783a3e (patch)
tree0fea7da8d9fa1a43834eae0874f9935c3a390d24 /src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp
parent29e1fcfba128b1af20a67a02148a34e163b2d5b9 (diff)
Fix datainput type issuesv2.0.0-rc2v2.0.0
- When adding a new data input the type is set correctly even if you don't touch the type combo. - When adding a new data input from popup menu for property, timeline, or slide panel, the corresponding data input is not changed if the new data input is of unsuitable type. - Correct default type is shown for each property when setting data input from inspector panel. Task-number: QT3DS-1913 Change-Id: I704cb704fb1ec9aca916ed7f7542ace404bba77c Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp')
-rw-r--r--src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp b/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp
index 671a0f76..54ebf193 100644
--- a/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp
+++ b/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp
@@ -488,7 +488,8 @@ QObject *InspectorControlView::showObjectReference(int handle, int instance, con
QObject *InspectorControlView::showDataInputChooser(int handle, int instance, const QPoint &point)
{
if (!m_dataInputChooserView) {
- m_dataInputChooserView = new DataInputSelectView(this);
+ const QVector<EDataType> acceptedTypes;
+ m_dataInputChooserView = new DataInputSelectView(acceptedTypes);
connect(m_dataInputChooserView, &DataInputSelectView::dataInputChanged, this,
[this](int handle, int instance, const QString &controllerName) {
bool controlled =
@@ -511,7 +512,7 @@ QObject *InspectorControlView::showDataInputChooser(int handle, int instance, co
if (CDataInputDlg::isEquivalentDataType(it->type, dataType))
dataInputList.append(QPair<QString, int>(it->name, it->type));
}
-
+ m_dataInputChooserView->setAcceptedTypes(CDataInputDlg::getAcceptedTypes(dataType));
m_dataInputChooserView->
setData(dataInputList,
m_inspectorControlModel->currentControllerValue(instance, handle),