From 7f6c5fc9aaea9f00c2d0999fe6041bbc2da8f3be Mon Sep 17 00:00:00 2001 From: jkriege2 Date: Fri, 21 Jul 2023 21:53:06 +0200 Subject: [PATCH] FIXED: Barcharts were not filled with cycling patterns properly and the first default symbol was never used (in JKQTBasePlotter::getPlotStyle()) --- lib/jkqtplotter/jkqtpbaseplotter.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/jkqtplotter/jkqtpbaseplotter.cpp b/lib/jkqtplotter/jkqtpbaseplotter.cpp index 55bacaad73..4a76ce0c01 100644 --- a/lib/jkqtplotter/jkqtpbaseplotter.cpp +++ b/lib/jkqtplotter/jkqtpbaseplotter.cpp @@ -547,11 +547,15 @@ double JKQTBasePlotter::getAbsoluteYMax() const { } void JKQTBasePlotter::addGridPrintingPlotter(size_t x, size_t y, JKQTBasePlotter *plotter) { - JKQTPGridPrintingItem i; - i.x=x; - i.y=y; - i.plotter=plotter; - gridPrintingList.push_back(i); + if (plotter==this) { + setGridPrintingCurrentPos(x,y); + } else { + JKQTPGridPrintingItem i; + i.x=x; + i.y=y; + i.plotter=plotter; + gridPrintingList.push_back(i); + } } void JKQTBasePlotter::clearGridPrintingPlotters() { @@ -1074,7 +1078,7 @@ void JKQTBasePlotter::drawSystemYAxis(JKQTPEnhancedPainter& painter) { JKQTBasePlotter::JKQTPPen JKQTBasePlotter::getPlotStyle(int i, JKQTPPlotStyleType type) const{ int colorI=-1; int styleI=0; - int symbolI=0; + int symbolI=-1; int brushI=0; for (int k=0; k<=i; k++) { colorI++; @@ -1109,9 +1113,6 @@ JKQTBasePlotter::JKQTPPen JKQTBasePlotter::getPlotStyle(int i, JKQTPPlotStyleTyp if (type==JKQTPPlotStyleType::Barchart || type==JKQTPPlotStyleType::Boxplot || type==JKQTPPlotStyleType::Impulses) { basePenStyle=Qt::SolidLine; } - if (type==JKQTPPlotStyleType::Barchart) { - basebrushStyle=Qt::SolidPattern; - } if (type==JKQTPPlotStyleType::Boxplot) { basebrushStyle=Qt::SolidPattern; }