From 663e35ea00a2d338983732808b5e043124f093cc Mon Sep 17 00:00:00 2001 From: gouldtj Date: Wed, 29 Mar 2006 05:42:57 +0000 Subject: [PATCH] r11026@tres: ted | 2006-03-02 00:03:49 -0800 Well, adding an unparent() here seems to make things much happier. I'm not sure why remove() doesn't do an unparent() also, I think this may be a bug in GTKmm where it assumes that other code won't have a reference to an object, but I'm not sure. Anyway, this should be safe even if the bug is fixed, and it works now. --- src/ui/dialog/extension-editor.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/ui/dialog/extension-editor.cpp b/src/ui/dialog/extension-editor.cpp index ed9d020c7..d642805c1 100644 --- a/src/ui/dialog/extension-editor.cpp +++ b/src/ui/dialog/extension-editor.cpp @@ -154,7 +154,9 @@ ExtensionEditor::on_pagelist_selection_changed (void) if (info == NULL) { info = Inkscape::Extension::db.get(id.c_str())->get_info_widget(); row[_page_list_columns._col_info] = info; - //info->ref(); + info->reference(); + } else { + info->unparent(); } Gtk::Widget * help; @@ -162,7 +164,9 @@ ExtensionEditor::on_pagelist_selection_changed (void) if (help == NULL) { help = Inkscape::Extension::db.get(id.c_str())->get_help_widget(); row[_page_list_columns._col_help] = help; - //help->ref(); + help->reference(); + } else { + help->unparent(); } Gtk::Widget * params; @@ -170,7 +174,9 @@ ExtensionEditor::on_pagelist_selection_changed (void) if (params == NULL) { params = Inkscape::Extension::db.get(id.c_str())->get_params_widget(); row[_page_list_columns._col_params] = params; - //params->ref(); + params->reference(); + } else { + params->unparent(); } /* Place them in the pages */ -- 2.30.2