summaryrefslogtreecommitdiffstats
path: root/src/Authoring
diff options
context:
space:
mode:
authorKaj Grönholm <kaj.gronholm@qt.io>2020-09-17 12:09:03 +0300
committerKaj Grönholm <kaj.gronholm@qt.io>2020-09-17 14:27:04 +0300
commitc93a09cccc04c3797f8f4edc52c86809edca8994 (patch)
tree3550ef269c2a9cbbe2aa8ae00b4a7972d51484e3 /src/Authoring
parenta7e279422c9b984b06b2b0e792bf5240076b66c2 (diff)
Fix updating action signal name
Task-number: QT3DS-4164 Change-Id: I742917f043421bdb5f15c03153672d047aa1e1fb Reviewed-by: Tony Leinonen <tony.leinonen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'src/Authoring')
-rw-r--r--src/Authoring/Qt3DStudio/Palettes/Action/ActionView.cpp3
-rw-r--r--src/Authoring/Qt3DStudio/Palettes/Action/ActionView.h3
2 files changed, 5 insertions, 1 deletions
diff --git a/src/Authoring/Qt3DStudio/Palettes/Action/ActionView.cpp b/src/Authoring/Qt3DStudio/Palettes/Action/ActionView.cpp
index e8a7f061..5c3e02f9 100644
--- a/src/Authoring/Qt3DStudio/Palettes/Action/ActionView.cpp
+++ b/src/Authoring/Qt3DStudio/Palettes/Action/ActionView.cpp
@@ -1034,6 +1034,8 @@ void ActionView::updateHandlerArguments()
m_currentPropertyValueHandle = 0;
m_currentPropertyNameHandle = 0;
m_handlerArguments.clear();
+ // Emit empty list, to force update even when arguments amount remain the same
+ Q_EMIT handlerArgumentsChanged();
const auto doc = GetDoc();
if (!doc->isValid() || !m_itemHandle.Valid())
return;
@@ -1059,6 +1061,7 @@ void ActionView::updateHandlerArguments()
argument.m_completeType = argMetaData->m_CompleteType;
m_handlerArguments.append(QVariant::fromValue(argument));
}
+ Q_EMIT handlerArgumentsChanged();
}
}
diff --git a/src/Authoring/Qt3DStudio/Palettes/Action/ActionView.h b/src/Authoring/Qt3DStudio/Palettes/Action/ActionView.h
index ab2976f3..c55ad143 100644
--- a/src/Authoring/Qt3DStudio/Palettes/Action/ActionView.h
+++ b/src/Authoring/Qt3DStudio/Palettes/Action/ActionView.h
@@ -91,7 +91,7 @@ class ActionView : public QQuickWidget,
Q_PROPERTY(QString targetObjectName READ targetObjectName NOTIFY actionChanged FINAL)
Q_PROPERTY(QString eventName READ eventName NOTIFY actionChanged FINAL)
Q_PROPERTY(QString handlerName READ handlerName NOTIFY actionChanged FINAL)
- Q_PROPERTY(QVariantList handlerArguments READ handlerArguments NOTIFY actionChanged FINAL)
+ Q_PROPERTY(QVariantList handlerArguments READ handlerArguments NOTIFY handlerArgumentsChanged FINAL)
Q_PROPERTY(PropertyInfo property READ property NOTIFY propertyChanged FINAL)
Q_PROPERTY(QString firedEvent MEMBER m_firedEvent NOTIFY firedEventChanged FINAL)
Q_PROPERTY(bool propertyValueInvalid READ isPropertyValueInvalid NOTIFY propertyValueInvalidChanged FINAL)
@@ -166,6 +166,7 @@ Q_SIGNALS:
void hasItemChanged();
void propertyValueInvalidChanged();
void dialogCurrentColorChanged(const QColor &newColor);
+ void handlerArgumentsChanged();
private Q_SLOTS:
void copyAction();