2005-09-06 Mike Kestner <mkestner@novell.com>

* gtk/NodeStore.cs : fix recursive emit of row_inserted.

svn path=/trunk/gtk-sharp/; revision=49563
This commit is contained in:
Mike Kestner 2005-09-06 18:09:40 +00:00
parent 0b40e4092b
commit 2a61d6e9d9
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2005-09-06 Mike Kestner <mkestner@novell.com>
* gtk/NodeStore.cs : fix recursive emit of row_inserted.
2005-09-02 Tambet Ingo <tambet@ximian.com> 2005-09-02 Tambet Ingo <tambet@ximian.com>
* glib/Object.cs: Clean disposed flag from resurrected objects. * glib/Object.cs: Clean disposed flag from resurrected objects.

View file

@ -389,7 +389,6 @@ namespace Gtk {
node.Changed += new EventHandler (changed_cb); node.Changed += new EventHandler (changed_cb);
node.ChildAdded += new TreeNodeAddedHandler (child_added_cb); node.ChildAdded += new TreeNodeAddedHandler (child_added_cb);
node.ChildRemoved += new TreeNodeRemovedHandler (child_deleted_cb); node.ChildRemoved += new TreeNodeRemovedHandler (child_deleted_cb);
gtksharp_node_store_emit_row_inserted (Handle, get_path_cb (node.ID), node.ID);
for (int i = 0; i < node.ChildCount; i++) for (int i = 0; i < node.ChildCount; i++)
AddNodeInternal (node [i]); AddNodeInternal (node [i]);
@ -399,6 +398,9 @@ namespace Gtk {
{ {
nodes.Add (node); nodes.Add (node);
AddNodeInternal (node); AddNodeInternal (node);
gtksharp_node_store_emit_row_inserted (Handle, get_path_cb (node.ID), node.ID);
for (int i = 0; i < node.ChildCount; i++)
gtksharp_node_store_emit_row_inserted (Handle, get_path_cb (node[i].ID), node[i].ID);
} }
public void AddNode (ITreeNode node, int position) public void AddNode (ITreeNode node, int position)
@ -407,6 +409,8 @@ namespace Gtk {
AddNodeInternal (node); AddNodeInternal (node);
gtksharp_node_store_emit_row_inserted (Handle, get_path_cb (node.ID), node.ID); gtksharp_node_store_emit_row_inserted (Handle, get_path_cb (node.ID), node.ID);
for (int i = 0; i < node.ChildCount; i++)
gtksharp_node_store_emit_row_inserted (Handle, get_path_cb (node[i].ID), node[i].ID);
} }
public void RemoveNode (ITreeNode node) public void RemoveNode (ITreeNode node)