forked from AuroraMiddleware/gtk
treeview: fix a critical warning
gtk_tree_view_column_unset_tree_view() resets column->priv->tree_view to NULL. The function is called when a column is removed, but later from the same function we would call _gtk_tree_view_column_unrealize_button(), which expects column->priv->tree_view to be != NULL, causing these critical warnings Gtk-CRITICAL **: gtk_widget_unregister_window: assertion `GTK_IS_WIDGET (widget)' failed This commit moves the call to unset the tree view after the button is unrealized. https://bugzilla.gnome.org/show_bug.cgi?id=695473
This commit is contained in:
parent
15ddeac195
commit
fd51c8f5e9
@ -11965,8 +11965,6 @@ gtk_tree_view_remove_column (GtkTreeView *tree_view,
|
||||
G_CALLBACK (column_sizing_notify),
|
||||
tree_view);
|
||||
|
||||
_gtk_tree_view_column_unset_tree_view (column);
|
||||
|
||||
position = g_list_index (tree_view->priv->columns, column);
|
||||
|
||||
tree_view->priv->columns = g_list_remove (tree_view->priv->columns, column);
|
||||
@ -11994,7 +11992,7 @@ gtk_tree_view_remove_column (GtkTreeView *tree_view,
|
||||
}
|
||||
|
||||
_gtk_tree_view_reset_header_styles (tree_view);
|
||||
|
||||
_gtk_tree_view_column_unset_tree_view (column);
|
||||
_gtk_tree_view_accessible_remove_column (tree_view, column, position);
|
||||
|
||||
g_object_unref (column);
|
||||
|
Loading…
Reference in New Issue
Block a user