Ensure we have a valid context before drawing keyframes

parent 63927a33
Pipeline #23343 passed with stage
in 13 minutes and 37 seconds
......@@ -266,8 +266,9 @@ Rectangle
if (kfrCount < 2) {
return
}
context.beginPath()
context.fillStyle = Qt.rgba(0,0,0.8, 0.5);
var ctx = getContext("2d");
ctx.beginPath()
ctx.fillStyle = Qt.rgba(0,0,0.8, 0.5);
paths = []
var xpos
var ypos
......@@ -291,10 +292,10 @@ Rectangle
paths.push(compline.createObject(keyframecanvas, {"x": parent.width, "y": ypos} ))
paths.push(compline.createObject(keyframecanvas, {"x": parent.width, "y": parent.height} ))
myPath.pathElements = paths
context.clearRect(0,0, width, height);
context.path = myPath;
context.closePath()
context.fill()
ctx.clearRect(0,0, width, height);
ctx.path = myPath;
ctx.closePath()
ctx.fill()
}
}
}
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