Re: Treeview selections vanish when parent collapses
- From: Kristian Rietveld <kris gtk org>
- To: jeff_barish earthlink net
- Cc: gtk-list gnome org
- Subject: Re: Treeview selections vanish when parent collapses
- Date: Mon, 20 Jun 2011 20:34:28 +0200
Hi Jeffrey,
On Jun 20, 2011, at 1:11 AM, Jeffrey Barish wrote:
> If you select children in a treeview and then collapse the parent, the
> selections vanish. So: select a child, collapse the parent, expand the
> parent, the child is no longer selected. That behavior seems wrong to me.
> Should I file a bug, or is GTK designed to work this way? The tutorial for
The widget is designed to work like this, there is actually a long-standing enhancement bug about this issue:
https://bugzilla.gnome.org/show_bug.cgi?id=80870
It is a hard problem to solve, the data structure used internally in GtkTreeView can only keep track of nodes that are visible (i.e. expanded). So the selection state of a collapsed node cannot be recorded in this data structure. Changing this data structure is hard, because a lot of GtkTreeView code depends on the data structure to work this way (reference counting, height calculation, checking whether or not a node is expanded, etc.)
Additionally, I can expect there to be usability problems with storing selection of collapsed nodes, especially if a selection is hidden three levels deep and you attempt some operation on the set of selected nodes.
> GTK 1.2 says that the selection should remain, but that source is ancient
> history.
That tutorial should be about a widget that predates GtkTreeView.
regards,
-kris.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]