summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2021-02-11 09:11:52 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2021-02-11 09:12:12 +0100
commited5854d65a0b1da14eecf382e46512fbb9b94f02 (patch)
tree679e8857be4b051e5ffce5e0312599124da51fc6
parentd53d6f3bcefc3e7f42cdf4920d24dc851aa63b00 (diff)
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.
-rw-r--r--src/Fl_Shared_Image.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Fl_Shared_Image.cxx b/src/Fl_Shared_Image.cxx
index 4ea778d6a..e0bb524ad 100644
--- a/src/Fl_Shared_Image.cxx
+++ b/src/Fl_Shared_Image.cxx
@@ -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 {