From 66cea4322f914b25ae48d04c00a167a4bc74cc47 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Sat, 5 May 2012 13:36:47 +0000 Subject: Fix STR #2836: copy_label() with old label() value failed. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9443 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Window.cxx | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/Fl_Window.cxx') diff --git a/src/Fl_Window.cxx b/src/Fl_Window.cxx index 7ca25a220..f5c295d77 100644 --- a/src/Fl_Window.cxx +++ b/src/Fl_Window.cxx @@ -139,22 +139,16 @@ void Fl_Window::draw() { } void Fl_Window::label(const char *name) { - label(name, iconlabel()); + label(name, iconlabel()); // platform dependent } void Fl_Window::copy_label(const char *a) { - if (flags() & COPIED_LABEL) { - free((void *)label()); - clear_flag(COPIED_LABEL); - } - if (a) a = strdup(a); - label(a, iconlabel()); - set_flag(COPIED_LABEL); + Fl_Widget::copy_label(a); + label(label(), iconlabel()); // platform dependent } - void Fl_Window::iconlabel(const char *iname) { - label(label(), iname); + label(label(), iname); // platform dependent } // the Fl::atclose pointer is provided for back compatibility. You -- cgit v1.2.3