FIXED: exporting gridPrinting plots when using only a JKQTBasePlotter

This commit is contained in:
jkriege2 2023-07-22 00:12:55 +02:00
parent 3a789250be
commit b6b5c48d9e

View File

@ -2242,8 +2242,8 @@ void JKQTBasePlotter::exportpreviewPaintRequested(JKQTPEnhancedPainter &painter,
QApplication::processEvents(); QApplication::processEvents();
int oldWidgetWidth=widgetWidth; int oldWidgetWidth=widgetWidth;
int oldWidgetHeight=widgetHeight; int oldWidgetHeight=widgetHeight;
widgetWidth=size.width(); //widgetWidth=size.width();
widgetHeight=size.height(); //widgetHeight=size.height();
gridPaint(painter, size); gridPaint(painter, size);
widgetWidth=oldWidgetWidth; widgetWidth=oldWidgetWidth;
@ -4047,7 +4047,7 @@ QImage JKQTBasePlotter::grabPixelImage(QSize size, bool showPreview)
//std::cout<<gridPrintingSize.width()<<", "<<gridPrintingSize.height()<<std::endl; //std::cout<<gridPrintingSize.width()<<", "<<gridPrintingSize.height()<<std::endl;
printSizeX_Millimeter=gridPrintingSize.width(); printSizeX_Millimeter=gridPrintingSize.width();
printSizeY_Millimeter=gridPrintingSize.height(); printSizeY_Millimeter=gridPrintingSize.height();
if (!showPreview) { if (!showPreview && !gridPrinting) {
printSizeX_Millimeter=widgetWidth; printSizeX_Millimeter=widgetWidth;
printSizeY_Millimeter=widgetHeight; printSizeY_Millimeter=widgetHeight;
} }