diff options
author | Kai Koehne <kai.koehne@nokia.com> | 2010-02-25 12:35:39 +0100 |
---|---|---|
committer | Kai Koehne <kai.koehne@nokia.com> | 2010-02-25 12:42:30 +0100 |
commit | bd82bdb6fa350edfbbe5032ad1b390c9277e4b09 (patch) | |
tree | 4c00ddaa521f5e426d39a5812a9ad90aa20da4b5 /src/plugins/qmldesigner/components/stateseditor/stateslist.qml | |
parent | 541e8a58955cd87d5599b779ef2e2331a966fd0f (diff) |
QmlDesigner: Fix all states only showing base state in States Editor
Let the State Editor also use the new activateState method from
QmlModelView (stateChanged by default does now nothing). This allowed
us to get rid of the setCurrentStateBack method. Also fix deletion of
states - the "decision" which state should be the new one is now done
in StatesEditorView.
Reviewed-by: Thomas Hartmann
Reviewed-by: Christiaan Janssen
Diffstat (limited to 'src/plugins/qmldesigner/components/stateseditor/stateslist.qml')
-rw-r--r-- | src/plugins/qmldesigner/components/stateseditor/stateslist.qml | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/plugins/qmldesigner/components/stateseditor/stateslist.qml b/src/plugins/qmldesigner/components/stateseditor/stateslist.qml index bcc6300ee1..1fe136843a 100644 --- a/src/plugins/qmldesigner/components/stateseditor/stateslist.qml +++ b/src/plugins/qmldesigner/components/stateseditor/stateslist.qml @@ -6,7 +6,7 @@ Rectangle { id: root property int currentStateIndex : 0 signal createNewState - signal deleteCurrentState + signal deleteState(int index) signal duplicateCurrentState color: "#707070"; @@ -203,13 +203,9 @@ Rectangle { MouseRegion { anchors.fill:parent onClicked: { - var oldindex = root.currentStateIndex; - root.currentStateIndex = index; root.unFocus(); - root.deleteCurrentState(); - root.currentStateIndex = oldindex; - if (root.currentStateIndex >= statesEditorModel.count) - root.currentStateIndex = root.currentStateIndex-1; + + root.deleteState(index); horizontalScrollbar.totalLengthDecreased(); } onPressed: {parent.state="Pressed"} |