Re: Gtk::TreeSelection behaving strangely



Found the bug: I was connected to the wrong signal: 

I was updating the interface, and checking the selection after the signal_cursor_changed() instead of the get_selection()->signal_changed(). Funny that it would work for the single selection mode, it only broke things when I started using Gtk::SELECTION_MULTIPLE.

Hope this helps someone searching for the same problem :)

- jan


----- Original Message ----
From: Jan Pfeifer <jan pfeifer yahoo com br>
To: gtkmm-list gnome org
Sent: Sunday, July 9, 2006 7:45:24 PM
Subject: Gtk::TreeSelection behaving strangely

After I started using multiple selection with set_mode(Gtk::SELECTION_MULTIPLE) in my Gtk::TreeView (with a ListStore model behind), the Gtk::TreeSelection is behaving very strangely. 

The number of selected rows is different than those that are actually selected in the interface. Using the method TreeSelection::is_selected(iterator) also returns strange results: mark as selected some rows that are not in the interface, and fails to report others that were selected.

Any ideas what could be causing this ? I tried using the underlying gtk methods, with gtk_tree_view_get_selection() and gtk_tree_selection_count_selected_rows() but they also return strange results -- so I guess this is not an gtkmm specific question ...

thx,

- jan

ps.: I'm working on a Ubuntu 6.06 amd64








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