Commit 828283da authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Display timeline color area for effects with only 1 keyframe, hide adjustable...

Display timeline color area for effects with only 1 keyframe, hide adjustable keyframe from timeline when there is only 1 keyframe.
Fixes #1522
parent c3145570
......@@ -93,7 +93,7 @@ Rectangle
// Keyframes container
anchors.fill: parent
z: 5
visible: keyframeContainer.selected && keyframeContainer.width > root.baseUnit * 3 && (kfrCount < (keyframeContainer.width / root.baseUnit))
visible: keyframeContainer.selected && keyframeContainer.width > root.baseUnit * 3 && (kfrCount < (keyframeContainer.width / root.baseUnit)) && kfrCount > 1
Repeater {
id: keyframes
model: kfrModel
......@@ -293,8 +293,8 @@ Rectangle
property int offset: scrollStart < 0 || parent.width <= scrollView.width ? 0 : scrollStart
anchors.left: parent.left
anchors.leftMargin: offset
width: kfrCount > 1 ? Math.min(parent.width, scrollView.width) : 0
height: kfrCount > 1 ? parent.height : 0
width: kfrCount > 0 ? Math.min(parent.width, scrollView.width) : 0
height: kfrCount > 0 ? parent.height : 0
opacity: keyframeContainer.selected ? 1 : 0.5
Component {
id: comp
......@@ -312,7 +312,7 @@ Rectangle
}
onPaint: {
if (kfrCount < 2) {
if (kfrCount < 1) {
return
}
var ctx = getContext("2d");
......
Supports Markdown
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