Reverse Z order for tracks so that compositions will always be on top if overlapping track below

parent aab4f659
......@@ -365,6 +365,9 @@ QVariant TimelineItemModel::data(const QModelIndex &index, int role) const
case EffectsEnabledRole: {
return getTrackById_const(id)->stackEnabled();
}
case IsCompositionRole: {
return false;
}
default:
break;
}
......
......@@ -116,12 +116,7 @@ Item {
}
MouseArea {
id: mouseArea
anchors.top: compositionRoot.top
anchors.right: compositionRoot.right
anchors.left: compositionRoot.left
anchors.topMargin: displayHeight
height: displayHeight
//anchors.fill: parent
anchors.fill: displayRect
acceptedButtons: Qt.RightButton
hoverEnabled: true
/*onPressed: {
......
......@@ -924,7 +924,8 @@ Rectangle {
Rectangle {
id: tracksContainerArea
width: Math.max(scrollView.width - scrollView.__verticalScrollBar.width, timeline.fullDuration * timeScale)
height: Math.max(trackHeaders.height, scrollView.height - scrollView.__horizontalScrollBar.height)
height: trackHeaders.height
//Math.max(trackHeaders.height, scrollView.contentHeight - scrollView.__horizontalScrollBar.height)
color: root.color
Rectangle {
// Drag proxy, responsible for clip / composition move
......@@ -1237,24 +1238,7 @@ Rectangle {
trackThumbsFormat: thumbsFormat
isCurrentTrack: item === timeline.activeTrack
trackInternalId: item
/*Rectangle {
anchors.right: parent.right
anchors.left: parent.left
height: parent.height
//source: "qrc:///pics/kdenlive-lock.svgz"
//fillMode: Image.Tile
opacity: parent.isLocked
color: '#33ff3300'
visible: opacity
Behavior on opacity { NumberAnimation {} }
MouseArea {
anchors.fill: parent
onPressed: {
mouse.accepted = true;
trackHeaderRepeater.itemAt(index).pulseLockButton()
}
}
}*/
z: tracksRepeater.count - index
}
}
......
......@@ -122,6 +122,7 @@ void TimelineWidget::setModel(std::shared_ptr<TimelineItemModel> model)
m_sortModel->setSourceModel(model.get());
m_sortModel->setSortRole(TimelineItemModel::SortRole);
m_sortModel->sort(0, Qt::DescendingOrder);
m_proxy->setModel(model);
rootContext()->setContextProperty("multitrack", m_sortModel.get());
rootContext()->setContextProperty("controller", model.get());
......
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