mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
rework the area_above == 0 case to not overwrite the variables in the
2006-10-27 Kristian Rietveld <kris@gtk.org> * gtk/gtktreeview.c (validate_visible_area): rework the area_above == 0 case to not overwrite the variables in the lower scope (which are used later on ...), get the path correctly and bail out when there isn't a node above us. (#359231).
This commit is contained in:
parent
69a5a5ac59
commit
c88087b694
@ -1,3 +1,10 @@
|
||||
2006-10-27 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (validate_visible_area): rework the area_above == 0
|
||||
case to not overwrite the variables in the lower scope (which are
|
||||
used later on ...), get the path correctly and bail out when there
|
||||
isn't a node above us. (#359231).
|
||||
|
||||
2006-10-26 Christian Persch <chpe@cvs.gnome.org>
|
||||
|
||||
* gtk/gtkaboutdialog.c: Put initial focus on Close button (#337261).
|
||||
|
@ -5742,32 +5742,30 @@ validate_visible_area (GtkTreeView *tree_view)
|
||||
*/
|
||||
if (area_above == 0)
|
||||
{
|
||||
GtkRBTree *tree;
|
||||
GtkRBNode *node;
|
||||
GtkTreePath *tmppath;
|
||||
GtkTreeIter iter;
|
||||
GtkRBTree *tmptree;
|
||||
GtkRBNode *tmpnode;
|
||||
|
||||
_gtk_tree_view_find_node (tree_view, above_path, &tree, &node);
|
||||
_gtk_tree_view_find_node (tree_view, above_path, &tmptree, &tmpnode);
|
||||
_gtk_rbtree_prev_full (tmptree, tmpnode, &tmptree, &tmpnode);
|
||||
|
||||
tmppath = gtk_tree_path_copy (above_path);
|
||||
|
||||
_gtk_rbtree_prev_full (tree, node, &tree, &node);
|
||||
if (! gtk_tree_path_prev (tmppath) && node != NULL)
|
||||
if (tmpnode)
|
||||
{
|
||||
gtk_tree_path_free (tmppath);
|
||||
tmppath = _gtk_tree_view_find_path (tree_view, tree, node);
|
||||
}
|
||||
gtk_tree_model_get_iter (tree_view->priv->model, &iter, tmppath);
|
||||
GtkTreePath *tmppath;
|
||||
GtkTreeIter tmpiter;
|
||||
|
||||
if (GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_INVALID) ||
|
||||
GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_COLUMN_INVALID))
|
||||
{
|
||||
_gtk_tree_view_queue_draw_node (tree_view, tree, node, NULL);
|
||||
if (validate_row (tree_view, tree, node, &iter, path))
|
||||
size_changed = TRUE;
|
||||
}
|
||||
tmppath = _gtk_tree_view_find_path (tree_view, tmptree, tmpnode);
|
||||
gtk_tree_model_get_iter (tree_view->priv->model, &tmpiter, tmppath);
|
||||
|
||||
gtk_tree_path_free (tmppath);
|
||||
if (GTK_RBNODE_FLAG_SET (tmpnode, GTK_RBNODE_INVALID) ||
|
||||
GTK_RBNODE_FLAG_SET (tmpnode, GTK_RBNODE_COLUMN_INVALID))
|
||||
{
|
||||
_gtk_tree_view_queue_draw_node (tree_view, tmptree, tmpnode, NULL);
|
||||
if (validate_row (tree_view, tmptree, tmpnode, &tmpiter, tmppath))
|
||||
size_changed = TRUE;
|
||||
}
|
||||
|
||||
gtk_tree_path_free (tmppath);
|
||||
}
|
||||
}
|
||||
|
||||
/* Now, we walk forwards and backwards, measuring rows. Unfortunately,
|
||||
|
Loading…
Reference in New Issue
Block a user