Fix for issue #185 in Fl_Shared_Image::reload()

This fix updates Fl_Shared_Image::reload() to account for the data_w() and data_h()
image members.
This commit is contained in:
ManoloFLTK 2021-02-11 09:11:52 +01:00
parent d53d6f3bce
commit ed5854d65a

View File

@ -281,9 +281,9 @@ void Fl_Shared_Image::reload() {
alloc_image_ = 1;
if ((img->w() != w() && w()) || (img->h() != h() && h())) {
if ((img->w() != data_w() && data_w()) || (img->h() != data_h() && data_h())) {
// Make sure the reloaded image is the same size as the existing one.
Fl_Image *temp = img->copy(w(), h());
Fl_Image *temp = img->copy(data_w(), data_h());
delete img;
image_ = temp;
} else {