forked from qt-creator/qt-creator
QmlDesigner: Fix empty when condition submit
Task-number: QDS-7729 Change-Id: Ia9ed1a911fd9ec5d6ffdcdb7ccfe0bb2ba843dc5 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
committed by
Henning Gründl
parent
95384d4526
commit
07c8f5249f
@@ -87,9 +87,7 @@ StudioControls.Menu {
|
|||||||
StudioControls.MenuItem {
|
StudioControls.MenuItem {
|
||||||
enabled: !root.isBaseState && root.hasWhenCondition
|
enabled: !root.isBaseState && root.hasWhenCondition
|
||||||
text: qsTr("Reset when Condition")
|
text: qsTr("Reset when Condition")
|
||||||
onTriggered: {
|
onTriggered: root.resetWhenCondition()
|
||||||
statesEditorModel.resetWhenCondition(internalNodeId)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
StudioControls.MenuSeparator {}
|
StudioControls.MenuSeparator {}
|
||||||
|
@@ -654,7 +654,12 @@ Item {
|
|||||||
return
|
return
|
||||||
|
|
||||||
whenCondition.previousCondition = whenCondition.text
|
whenCondition.previousCondition = whenCondition.text
|
||||||
|
|
||||||
|
if (whenCondition.text !== "")
|
||||||
root.whenConditionFinished()
|
root.whenConditionFinished()
|
||||||
|
else
|
||||||
|
statesEditorModel.resetWhenCondition(root.internalNodeId)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: whenCondition.previousCondition = whenCondition.text
|
Component.onCompleted: whenCondition.previousCondition = whenCondition.text
|
||||||
@@ -694,6 +699,7 @@ Item {
|
|||||||
onExtend: root.extend()
|
onExtend: root.extend()
|
||||||
onRemove: root.remove()
|
onRemove: root.remove()
|
||||||
onToggle: root.propertyChangesVisible = !root.propertyChangesVisible
|
onToggle: root.propertyChangesVisible = !root.propertyChangesVisible
|
||||||
|
onResetWhenCondition: statesEditorModel.resetWhenCondition(root.internalNodeId)
|
||||||
onEditAnnotation: {
|
onEditAnnotation: {
|
||||||
statesEditorModel.setAnnotation(root.internalNodeId)
|
statesEditorModel.setAnnotation(root.internalNodeId)
|
||||||
stateMenu.hasAnnotation = root.checkAnnotation()
|
stateMenu.hasAnnotation = root.checkAnnotation()
|
||||||
|
Reference in New Issue
Block a user