GtkTreeView and GtkAnjustment problem!



Hello all!

I write "value-changed" signal handler for GtkAdjustment object.
GtkAdjustment object set to GtkScrolledWindow container with GtkTreeView
in it.

when in main loop executes next code:
gtk_tree_selection_select_path (selection, tree_path);

I get next errors in console:

Gtk-CRITICAL **: _gtk_tree_view_find_path: assertion
`node != NULL' failed

Gtk-CRITICAL **: gtk_tree_path_compare: assertion
`b->depth > 0' failed

I don't understand this messages
This is signal handler code:

        // here i get first message
    if (gtk_tree_view_get_visible_range (tree_view,
            &start_path, &end_path) == FALSE)
        return;

    if (gtk_tree_model_get_iter (tree_model, &iter, start_path) ==
FALSE) {
        gtk_tree_path_free (start_path);
        gtk_tree_path_free (end_path);
        return;
    }

    do 
    {
        cur_path = gtk_tree_model_get_path (tree_model, &iter);
        if (cur_path == NULL)
            break;

        gtk_tree_model_get (tree_model, &iter,
                model_update_if, &update,
                -1);

        if (update == TRUE)
        {
            gtk_tree_view_get_cell_area (tree_view,
                    cur_path,
                    column,
                    &cell_area);

            gtk_widget_queue_draw_area (GTK_WIDGET (tree_view),
                cell_area.x,
                // TODO: Why it is need to add
rotate_step_info->cell_area.height???? cell_area.y + cell_area.height,
                cell_area.width,
                cell_area.height);
        }

        //here i get second message
        if (!gtk_tree_path_compare (cur_path, end_path))
        {
            gtk_tree_path_free (cur_path);
            break;
        }

        gtk_tree_path_free (cur_path);
    } while (gtk_tree_model_iter_next (tree_model, &iter));

Anybody now wat this mean?

Sorry for my BAD English.


Dubravin Andrey



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]