Re: [gtkmm] TreeView selection changes



Roger Leigh wrote:
Roger Leigh <roger whinlatter uklinux net> writes:


Depending on whether there is a selected row in the TreeView, I have
some [of the] buttons set insensitive.  In order to keep them in the
correct state, I attached a handler to the signal_changed() signal
of the Selection.  This works, but... when I call
Gtk::ListStore::clear() to clear the list, the Selection doesn't
emit a "changed" signal, even though its selection has been lost...
What is the best way to deal with this?


I solved this my manually calling my Gtk::TreeSelection
"signal_changed" callback after clearing the list.  Is the "changed"
signal only emitted due to /user/ interaction with the TreeView?  If
so, is there any way of detecting changes to the Selection due to
changes in the underlying ListStore?


I think the TreeView _should_ emit a changed signal if the selection disappears as a result of a clear(). You should probably create a bugzilla report on this.




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