forked from AuroraMiddleware/gtk
treeview: Fix comparison to catch all cases
Otherwise, we could sometimes fail to update the cursor node when the right row was deleted. Also, I'd like to file a formal complaint that this node/tree differentiation makes writing comparisons too complicated. https://bugzilla.gnome.org/show_bug.cgi?id=668169
This commit is contained in:
parent
080f8740f2
commit
2f3ffd5fde
@ -9025,7 +9025,8 @@ gtk_tree_view_row_deleted (GtkTreeModel *model,
|
||||
/* If the cursor row got deleted, move the cursor to the next row */
|
||||
if (tree_view->priv->cursor_node &&
|
||||
(tree_view->priv->cursor_node == node ||
|
||||
(node->children && _gtk_rbtree_contains (node->children, tree_view->priv->cursor_tree))))
|
||||
(node->children && (tree_view->priv->cursor_tree == node->children ||
|
||||
_gtk_rbtree_contains (node->children, tree_view->priv->cursor_tree)))))
|
||||
{
|
||||
GtkTreePath *cursor_path;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user