From 194a3b0ab02cb125f69f857f391980253db90f91 Mon Sep 17 00:00:00 2001 From: FalsinSoft Date: Thu, 4 Jan 2024 21:36:54 +0100 Subject: [PATCH] Fix custom labels draw --- lib/jkqtplotter/jkqtpcoordinateaxes.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/jkqtplotter/jkqtpcoordinateaxes.cpp b/lib/jkqtplotter/jkqtpcoordinateaxes.cpp index 3ae8ea92a8..b8b122b9af 100644 --- a/lib/jkqtplotter/jkqtpcoordinateaxes.cpp +++ b/lib/jkqtplotter/jkqtpcoordinateaxes.cpp @@ -1012,13 +1012,9 @@ bool JKQTPCoordinateAxis::getNextLabel(double& x, QString& label, bool init) { } else { for (int i=0; i=axismin && x<=axismax) { - label=tickLabels[i+1].second; - x=tickLabels[i+1].first; - return true; - } else { - return false; - } + x=tickLabels[i + 1].first; + label=tickLabels[i + 1].second; + return (x<=axismax); } } }