hopefully increase drawing performance
Format (JS/TS) / format (pull_request) Failing after 6s
Lint (JS/TS) / lint (pull_request) Failing after 15s
Lint (Python) / lint (pull_request) Failing after 18s
Lint (Rust) / lint (pull_request) Failing after 1m32s

This commit is contained in:
2026-05-19 10:04:04 +02:00
parent 362b7bb8c2
commit b20767c702
3 changed files with 49 additions and 197 deletions
+8 -5
View File
@@ -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 = [];
}
}