Skip to content

Commit

Permalink
Remove "interrupted" State from ModalDialog's StateManager
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeTrahearn-Qinetic committed Dec 23, 2024
1 parent d6bfe87 commit a25cfac
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions components/dialogs/ModalDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,6 @@ T.Dialog {
return
}

dialogStateGroup.state = "interrupted"

const currentDialogOffset = root.y - root.centeredY // 0 or negative
const inputItemBottomPos = inputItem.mapToItem(Global.mainView, 0, inputItem.implicitHeight).y - currentDialogOffset

Expand All @@ -201,6 +199,8 @@ T.Dialog {
let vkbTopPos = Global.mainView.height - Qt.inputMethod.keyboardRectangle.height

if (inputItemBottomPos > vkbTopPos) {
// Note: moving the Dialog while in "focused" state will change to
// the new location immediately without any animation.
targetDialogY += (vkbTopPos - inputItemBottomPos)
}

Expand All @@ -220,17 +220,10 @@ T.Dialog {
root.y: root.centeredY
}
},
State {
name: "interrupted"
// no PropertyChanges, interrupts any Transitions, does not change any properties
// due to the restoreEntryValues of the focused state being false
},
State {
name: "focused"

PropertyChanges {
root.y: stateManager.targetDialogY
restoreEntryValues: false
}
}
]
Expand Down

0 comments on commit a25cfac

Please sign in to comment.