mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +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;
|
target: mapItemImage; property: "scale"; from: 0.7; to: 1.0; duration: 80;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onSourceChanged: {
|
|
||||||
if (mapHelper.model.selectedUuid === model.uuid)
|
|
||||||
mapItemImageAnimation.restart()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
mapHelper.model.selectedUuid = model.uuid
|
mapHelper.model.selectedUuid = model.uuid
|
||||||
|
mapItemImageAnimation.restart()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue