fix typo of variable

This commit is contained in:
plc-user
2025-02-28 16:02:58 +01:00
parent e66061fdca
commit 15ae8b0058

View File

@@ -213,8 +213,8 @@ void Diagram::drawBackground(QPainter *p, const QRectF &r) {
.insideBorderRect() .insideBorderRect()
.intersected(r); .intersected(r);
qreal limite_x = rect.x() + rect.width(); qreal limit_x = rect.x() + rect.width();
qreal limite_y = rect.y() + rect.height(); qreal limit_y = rect.y() + rect.height();
int g_x = (int)ceil(rect.x()); int g_x = (int)ceil(rect.x());
while (g_x % xGrid) ++ g_x; while (g_x % xGrid) ++ g_x;
@@ -222,8 +222,8 @@ void Diagram::drawBackground(QPainter *p, const QRectF &r) {
while (g_y % yGrid) ++ g_y; while (g_y % yGrid) ++ g_y;
QPolygon points; QPolygon points;
for (int gx = g_x ; gx < limite_x ; gx += xGrid) { for (int gx = g_x ; gx < limit_x ; gx += xGrid) {
for (int gy = g_y ; gy < limite_y ; gy += yGrid) { for (int gy = g_y ; gy < limit_y ; gy += yGrid) {
points << QPoint(gx, gy); points << QPoint(gx, gy);
} }
} }