mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
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:
parent
23c56b3c31
commit
250fc1e03f
1 changed files with 1 additions and 5 deletions
|
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue