summaryrefslogtreecommitdiff
path: root/src/Fl_Shared_Image.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_Shared_Image.cxx')
-rw-r--r--src/Fl_Shared_Image.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Fl_Shared_Image.cxx b/src/Fl_Shared_Image.cxx
index 91e093b6f..6c14b9c12 100644
--- a/src/Fl_Shared_Image.cxx
+++ b/src/Fl_Shared_Image.cxx
@@ -190,10 +190,12 @@ Fl_Shared_Image::add() {
void
Fl_Shared_Image::update() {
if (image_) {
- w(image_->w());
- h(image_->h());
+ int W = w(), H = h();
+ w(image_->data_w());
+ h(image_->data_h());
d(image_->d());
data(image_->data(), image_->count());
+ if (W && H) scale(W, H, 0, 1);
}
}