diff --git a/lib/jkqtplotter/jkqtpgraphscontour.cpp b/lib/jkqtplotter/jkqtpgraphscontour.cpp index 966bd21414..f291258f62 100644 --- a/lib/jkqtplotter/jkqtpgraphscontour.cpp +++ b/lib/jkqtplotter/jkqtpgraphscontour.cpp @@ -217,6 +217,10 @@ void JKQTPContour::setImageColumn(size_t columnID) { datatype=JKQTPMathImageBase::DoubleArray; data=parent->getDatastore()->getColumnPointer(columnID,0); + if (parent && columnID>=0 && parent->getDatastore()) { + setNx(parent->getDatastore()->getColumnImageWidth(columnID)); + setNy(parent->getDatastore()->getColumnImageHeight(columnID)); + } } diff --git a/lib/jkqtplotter/jkqtpgraphsimage.cpp b/lib/jkqtplotter/jkqtpgraphsimage.cpp index 2361c58ecb..b770dcb728 100644 --- a/lib/jkqtplotter/jkqtpgraphsimage.cpp +++ b/lib/jkqtplotter/jkqtpgraphsimage.cpp @@ -1741,6 +1741,10 @@ int JKQTPColumnMathImage::getImageColumn() const void JKQTPColumnMathImage::setModifierColumn(int __value) { this->modifierColumn = __value; + if (parent && __value>=0 && parent->getDatastore()) { + setNx(parent->getDatastore()->getColumnImageWidth(__value)); + setNy(parent->getDatastore()->getColumnImageHeight(__value)); + } } int JKQTPColumnMathImage::getModifierColumn() const diff --git a/lib/jkqtplotter/jkqtpgraphsimageoverlays.cpp b/lib/jkqtplotter/jkqtpgraphsimageoverlays.cpp index 137c84391c..b6c00805aa 100644 --- a/lib/jkqtplotter/jkqtpgraphsimageoverlays.cpp +++ b/lib/jkqtplotter/jkqtpgraphsimageoverlays.cpp @@ -345,6 +345,10 @@ JKQTPColumnOverlayImageEnhanced::JKQTPColumnOverlayImageEnhanced(JKQTPlotter *pa void JKQTPColumnOverlayImageEnhanced::setImageColumn(int __value) { this->imageColumn = __value; + if (parent && __value>=0 && parent->getDatastore()) { + setNx(parent->getDatastore()->getColumnImageWidth(__value)); + setNy(parent->getDatastore()->getColumnImageHeight(__value)); + } } int JKQTPColumnOverlayImageEnhanced::getImageColumn() const diff --git a/lib/jkqtplotter/jkqtpgraphsimagergb.cpp b/lib/jkqtplotter/jkqtpgraphsimagergb.cpp index 2d07e571b6..84ba7e8c9f 100644 --- a/lib/jkqtplotter/jkqtpgraphsimagergb.cpp +++ b/lib/jkqtplotter/jkqtpgraphsimagergb.cpp @@ -1353,6 +1353,10 @@ int JKQTPColumnRGBMathImage::getModifierColumn() const void JKQTPColumnRGBMathImage::setModifierColumn(int __value) { this->modifierColumn = __value; + if (parent && __value>=0 && parent->getDatastore()) { + setNx(parent->getDatastore()->getColumnImageWidth(__value)); + setNy(parent->getDatastore()->getColumnImageHeight(__value)); + } } int JKQTPColumnRGBMathImage::getImageBColumn() const @@ -1363,6 +1367,10 @@ int JKQTPColumnRGBMathImage::getImageBColumn() const void JKQTPColumnRGBMathImage::setImageBColumn(int __value) { this->imageBColumn = __value; + if (parent && __value>=0 && parent->getDatastore()) { + setNx(parent->getDatastore()->getColumnImageWidth(__value)); + setNy(parent->getDatastore()->getColumnImageHeight(__value)); + } } int JKQTPColumnRGBMathImage::getImageGColumn() const @@ -1373,6 +1381,10 @@ int JKQTPColumnRGBMathImage::getImageGColumn() const void JKQTPColumnRGBMathImage::setImageGColumn(int __value) { this->imageGColumn = __value; + if (parent && __value>=0 && parent->getDatastore()) { + setNx(parent->getDatastore()->getColumnImageWidth(__value)); + setNy(parent->getDatastore()->getColumnImageHeight(__value)); + } } int JKQTPColumnRGBMathImage::getImageRColumn() const @@ -1383,4 +1395,8 @@ int JKQTPColumnRGBMathImage::getImageRColumn() const void JKQTPColumnRGBMathImage::setImageRColumn(int __value) { this->imageRColumn = __value; + if (parent && __value>=0 && parent->getDatastore()) { + setNx(parent->getDatastore()->getColumnImageWidth(__value)); + setNy(parent->getDatastore()->getColumnImageHeight(__value)); + } }