From 416ff7f24ef0f2c1b9f3d1118366a0d33124ac1a Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Fri, 3 Dec 2004 02:51:03 +0000 Subject: Fl_Shared_Image::reload() didn't set the image_ pointer properly in all cases (STR #632) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3929 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- CHANGES | 2 ++ src/Fl_Shared_Image.cxx | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index 8ea76ca80..c324d1f4f 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,7 @@ CHANGES IN FLTK 1.1.7 + - Fl_Shared_Image::reload() didn't set the image_ + pointer properly in all cases (STR #632) - Fl_Help_View::topline() incorrectly set the changed() flag (STR #631) - Fl_Choice::value() now supports NULL or -1 to deselect diff --git a/src/Fl_Shared_Image.cxx b/src/Fl_Shared_Image.cxx index 14b907a6a..66ff62709 100644 --- a/src/Fl_Shared_Image.cxx +++ b/src/Fl_Shared_Image.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Shared_Image.cxx,v 1.23.2.21 2004/09/24 16:00:11 easysw Exp $" +// "$Id: Fl_Shared_Image.cxx,v 1.23.2.22 2004/12/03 02:51:03 easysw Exp $" // // Shared image code for the Fast Light Tool Kit (FLTK). // @@ -245,14 +245,15 @@ Fl_Shared_Image::reload() { if (img) { if (alloc_image_) delete image_; - image_ = img; alloc_image_ = 1; if ((img->w() != w() && w()) || (img->h() != h() && h())) { // Make sure the reloaded image is the same size as the existing one. Fl_Image *temp = img->copy(w(), h()); delete img; - img = temp; + image_ = temp; + } else { + image_ = img; } update(); @@ -460,5 +461,5 @@ Fl_Shared_Image::remove_handler(Fl_Shared_Handler f) { // -// End of "$Id: Fl_Shared_Image.cxx,v 1.23.2.21 2004/09/24 16:00:11 easysw Exp $". +// End of "$Id: Fl_Shared_Image.cxx,v 1.23.2.22 2004/12/03 02:51:03 easysw Exp $". // -- cgit v1.2.3