diff options
author | Kaj Grönholm <kaj.gronholm@qt.io> | 2018-03-08 14:29:16 +0200 |
---|---|---|
committer | Marianne Yrjänä <marianne.yrjana@qt.io> | 2018-03-12 08:44:25 +0000 |
commit | 04479116702f72682f049d97a5f7f6b77a48c68f (patch) | |
tree | 779906608b9ee58899da0b3f56416ebc5574f518 /src/Authoring/Studio/Palettes/Action/ActionView.cpp | |
parent | c5799382739a6a634819f31fbd20ff1a3213e798 (diff) |
Fix crashing on layer action change
Make sure propertymodel name & value handles are always
up-to-date. Also, valueHandleChanged() signal was never emitted.
Task-number: QT3DS-1245
Change-Id: Id6772c3013684a997433323d00bb1d29c0656044
Reviewed-by: Marianne Yrjänä <marianne.yrjana@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Palettes/Action/ActionView.cpp')
-rw-r--r-- | src/Authoring/Studio/Palettes/Action/ActionView.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Authoring/Studio/Palettes/Action/ActionView.cpp b/src/Authoring/Studio/Palettes/Action/ActionView.cpp index 4a18e255..78d5bee8 100644 --- a/src/Authoring/Studio/Palettes/Action/ActionView.cpp +++ b/src/Authoring/Studio/Palettes/Action/ActionView.cpp @@ -246,9 +246,9 @@ void ActionView::setCurrentActionIndex(int index) void ActionView::setCurrentPropertyIndex(int handle, int index) { - if (index == m_currentPropertyIndex) - return; + // Make sure propertymodel name & value handles are always up-to-date, + // even when index is same as before m_currentPropertyValueHandle = 0; m_currentPropertyNameHandle = handle; for (int i = 0; i < m_handlerArguments.size(); ++i) { @@ -262,6 +262,9 @@ void ActionView::setCurrentPropertyIndex(int handle, int index) } } + if (index == m_currentPropertyIndex) + return; + m_currentPropertyIndex = index; // set the property for the handler |