summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaj Grönholm <kaj.gronholm@qt.io>2019-03-18 20:08:03 +0200
committerKaj Grönholm <kaj.gronholm@qt.io>2019-03-19 11:04:26 +0000
commit604868348a2fe42d7fcd45c4be40d07822f73d85 (patch)
tree093758fafcfc98a20722b6409ec679fc3ae32214
parenteec352d375e62e6881c10a783dae890dd6ce58ef (diff)
Handle empty vector type action values
With all-zero vector values (0,0,0) Studio doesn't currently store "value" parameter at all into uip. So empty vector type values are handled as "0 0 0". Task-number: QT3DS-3143 Change-Id: Iebb7c3f50296ef54da346e48601e14fe6d74892e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
-rw-r--r--src/runtime/q3dsuipparser.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/runtime/q3dsuipparser.cpp b/src/runtime/q3dsuipparser.cpp
index 3130aee..ecb79f9 100644
--- a/src/runtime/q3dsuipparser.cpp
+++ b/src/runtime/q3dsuipparser.cpp
@@ -648,6 +648,12 @@ void Q3DSUipParser::parseAddSet(Q3DSSlide *slide, bool isSet, bool isMaster)
ha.value = attr.value().trimmed().toString();
}
}
+ if (ha.value.isEmpty() && ha.type == Q3DS::Vector) {
+ // With all-zero vector values (0,0,0) Studio doesn't currently
+ // store "value" parameter at all into uip. So empty vector
+ // type values are handled as "0 0 0", see QT3DS-3143.
+ ha.value = QStringLiteral("0 0 0");
+ }
action.handlerArgs.append(ha);
}
r->skipCurrentElement();