Code

r11026@tres: ted | 2006-03-02 00:03:49 -0800
authorgouldtj <gouldtj@users.sourceforge.net>
Wed, 29 Mar 2006 05:42:57 +0000 (05:42 +0000)
committergouldtj <gouldtj@users.sourceforge.net>
Wed, 29 Mar 2006 05:42:57 +0000 (05:42 +0000)
 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

index ed9d020c7b6ed0270a4e9b6763b37259d5a4a917..d642805c18f5a132bd001676b146b3c04bc8b83c 100644 (file)
@@ -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 */