hopefully increase drawing performance
This commit is contained in:
@@ -30,8 +30,11 @@ CustomMouseArea {
|
||||
const x = event.x;
|
||||
const y = event.y;
|
||||
|
||||
if (event.buttons & Qt.LeftButton)
|
||||
root.drawing.appendPoint(x, y);
|
||||
if (root.visibilities.isDrawing && (event.buttons & Qt.LeftButton)) {
|
||||
root.drawing.points.push(Qt.point(x, y));
|
||||
console.log(root.drawing.points);
|
||||
root.drawing.requestPaint();
|
||||
}
|
||||
|
||||
if (root.inLeftPanel(root.popout, x, y)) {
|
||||
root.z = -2;
|
||||
@@ -44,7 +47,8 @@ CustomMouseArea {
|
||||
|
||||
if (root.visibilities.isDrawing && (event.buttons & Qt.LeftButton)) {
|
||||
root.panels.drawing.expanded = false;
|
||||
root.drawing.beginStroke(x, y);
|
||||
root.drawing.points.push(Qt.point(x, y));
|
||||
root.drawing.requestPaint();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -52,7 +56,6 @@ CustomMouseArea {
|
||||
root.drawing.clear();
|
||||
}
|
||||
onReleased: {
|
||||
if (root.visibilities.isDrawing)
|
||||
root.drawing.endStroke();
|
||||
root.drawing.points = [];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user