fix plot grid for non-integer zoom factors

This commit is contained in:
Philippe Teuwen 2020-10-09 16:22:50 +02:00
parent 4c85ce5f2f
commit 984b0d4803

View file

@ -512,8 +512,8 @@ void Plot::plotGridLines(QPainter *painter, QRect r) {
offset %= PlotGridX;
if (offset < 0) offset += PlotGridX;
int i;
int grid_delta_x = (int)(PlotGridX * GraphPixelsPerPoint);
double i;
double grid_delta_x = PlotGridX * GraphPixelsPerPoint;
int grid_delta_y = PlotGridY;
if ((PlotGridX > 0) && ((PlotGridX * GraphPixelsPerPoint) > 1)) {