avoid unnecessary JS bindings by using narrower conditions, remove logging
This commit is contained in:
@@ -23,6 +23,7 @@ Canvas {
|
||||
ctx.save();
|
||||
ctx.lineWidth = root.penWidth;
|
||||
ctx.strokeStyle = root.penColor;
|
||||
ctx.lineJoin = "round";
|
||||
ctx.lineCap = "round";
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(points[0].x, points[0].y);
|
||||
|
||||
@@ -32,10 +32,10 @@ CustomMouseArea {
|
||||
if (root.visibilities.isDrawing && (event.buttons & Qt.LeftButton)) {
|
||||
root.drawing.points.push(Qt.point(x, y));
|
||||
root.drawing.requestPaint();
|
||||
return;
|
||||
}
|
||||
|
||||
if (root.inLeftPanel(root.popout, x, y)) {
|
||||
console.log("set -2 z");
|
||||
if (!(event.buttons & Qt.LeftButton) && root.inLeftPanel(root.popout, x, y)) {
|
||||
root.z = -2;
|
||||
root.panels.drawing.expanded = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user