aboutsummaryrefslogtreecommitdiffstats
path: root/src/virtualkeyboard/styles/SelectionListItem.qml
diff options
context:
space:
mode:
authorJarkko Koivikko <jarkko.koivikko@code-q.fi>2015-04-10 14:40:32 +0300
committerJarkko Koivikko <jarkko.koivikko@code-q.fi>2015-04-10 15:27:58 +0300
commited8a4653103403f21d88e8981cf4464e2628f96c (patch)
tree564a695a2777e1968f703985de9772fdf014aff8 /src/virtualkeyboard/styles/SelectionListItem.qml
parent80ebe0d1e3061aaf5ba792f21813e0a8804112ad (diff)
Fix crash if a selection list item is selected while transitioning outv1.3.0-rc1
This crash occurs if the selection list item is selected right after the selection list is updated in such way that some of the items in the list are removed and transtioned away. If such item is selected, the application would crash. Change-Id: Iff7002932d94c9072044bb159af268cba3aa26ac Reviewed-by: Rainer Keller <rainer.keller@theqtcompany.com>
Diffstat (limited to 'src/virtualkeyboard/styles/SelectionListItem.qml')
-rw-r--r--src/virtualkeyboard/styles/SelectionListItem.qml2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/virtualkeyboard/styles/SelectionListItem.qml b/src/virtualkeyboard/styles/SelectionListItem.qml
index 74447c33..e196d839 100644
--- a/src/virtualkeyboard/styles/SelectionListItem.qml
+++ b/src/virtualkeyboard/styles/SelectionListItem.qml
@@ -44,6 +44,8 @@ Item {
anchors.fill: parent
hoverEnabled: true
onClicked: {
+ if (index === -1)
+ return
selectionListItem.ListView.view.currentIndex = index
selectionListItem.ListView.view.model.selectItem(index)
}