mapwidget.qml: don't use the onSourceChanged() slot for flag animation

It's best to only animate the flags when clicked, thus play the animation
in the onClicked() slot from the MouseArea.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
Lubomir I. Ivanov 2017-07-20 00:39:19 +03:00 committed by Dirk Hohndel
parent 23c56b3c31
commit 250fc1e03f

View file

@ -54,17 +54,13 @@ Item {
target: mapItemImage; property: "scale"; from: 0.7; to: 1.0; duration: 80;
}
}
onSourceChanged: {
if (mapHelper.model.selectedUuid === model.uuid)
mapItemImageAnimation.restart()
}
}
MouseArea {
anchors.fill: parent
onClicked: {
mapHelper.model.selectedUuid = model.uuid
mapItemImageAnimation.restart()
}
}
}