Commit 4f2ee42e authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Ensure selected subtitle always appears on top

parent 54b43cb5
......@@ -4,14 +4,14 @@ import QtQuick.Controls 2.4
Item {
id: subtitleRoot
visible : true
z: 20
z: selected ? 30 : 20
property int oldStartX
property int startFrame
property int endFrame
property int subId
property int duration : endFrame - startFrame
property double tScale: root.timeScale
property var subtitle
property string subtitle
property bool selected
height: subtitleTrack.height
onStartFrameChanged: {
......
......@@ -1574,47 +1574,13 @@ Rectangle {
DelegateModel {
id: subtitleDelegateModel
model: subtitleModel
delegate: Item {
Loader {
id: loader
Binding {
target: loader.item
property: "selected"
value: model.selected
when: loader.status == Loader.Ready && loader.item
}
Binding {
target: loader.item
property: "startFrame"
value: model.startframe
when: loader.status == Loader.Ready && loader.item
}
Binding {
target: loader.item
property: "endFrame"
value: model.endframe
when: loader.status == Loader.Ready && loader.item
}
Binding {
target: loader.item
property: "subtitle"
value: model.subtitle
when: loader.status == Loader.Ready && loader.item
}
sourceComponent: {
return subTitleDelegate
}
onLoaded: {
item.subId = model.id
}
}
delegate: SubTitle {
subId: model.id
selected: model.selected
startFrame: model.startframe
endFrame: model.endframe
subtitle: model.subtitle
}
}
Component {
id: subTitleDelegate
SubTitle {}
}
Connections {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment