From 241abf6ee62b043bdbc0d516a42dd2fada871052 Mon Sep 17 00:00:00 2001 From: maroy Date: Fri, 15 Apr 2005 07:51:37 +0000 Subject: [PATCH] fixed bug of wrongly displosing of the button label in set_label() --- .../modules/widgets/include/LiveSupport/Widgets/Button.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/livesupport/modules/widgets/include/LiveSupport/Widgets/Button.h b/livesupport/modules/widgets/include/LiveSupport/Widgets/Button.h index e183bd90a..302a60dc2 100644 --- a/livesupport/modules/widgets/include/LiveSupport/Widgets/Button.h +++ b/livesupport/modules/widgets/include/LiveSupport/Widgets/Button.h @@ -22,7 +22,7 @@ Author : $Author: maroy $ - Version : $Revision: 1.4 $ + Version : $Revision: 1.5 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/include/LiveSupport/Widgets/Button.h,v $ ------------------------------------------------------------------------------*/ @@ -64,7 +64,7 @@ using namespace LiveSupport::Core; * A button holding a text. * * @author $Author: maroy $ - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ */ class Button : public Gtk::Button { @@ -261,7 +261,8 @@ class Button : public Gtk::Button set_label(const Glib::ustring & label) throw () { if (child && child->is_managed_()) { - delete child; + // as the child is managed, unparent will delete it + child->unparent(); } this->label = label; child = Gtk::manage(new Gtk::Label(label));