summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@qt.io>2016-06-20 15:23:17 +0300
committerMiikka Heikkinen <miikka.heikkinen@qt.io>2016-06-20 12:28:53 +0000
commit2974fd8d933e48a8472dfccff62994adbf6e60e7 (patch)
tree75701fae2895866378a001b1fd9c535117ddfdc0
parent9a3e96a6a90400c39bcc11c0f6e7e1e9ffed8616 (diff)
Fix crash when undo/redoing the deletion of the last camera
While redoing the camera deletion, a new command was pushed into the undo stack, which corrupted the stack. Change-Id: I0dd04a67f4811fc7a1dacdac3397e68f58ae48d3 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
-rw-r--r--editorlib/qml/EditorToolbar.qml2
1 files changed, 1 insertions, 1 deletions
diff --git a/editorlib/qml/EditorToolbar.qml b/editorlib/qml/EditorToolbar.qml
index ef34885..af3e8b1 100644
--- a/editorlib/qml/EditorToolbar.qml
+++ b/editorlib/qml/EditorToolbar.qml
@@ -194,7 +194,7 @@ Item {
model: editorScene.sceneCamerasModel
textRole: "display"
- onCurrentIndexChanged: {
+ onActivated: {
editorScene.undoHandler.createChangeGenericPropertyCommand(
editorScene, "activeSceneCameraIndex",
currentIndex, editorScene.activeSceneCameraIndex,