diff options
author | Benjamin Otte <otte@redhat.com> | 2011-12-10 04:48:12 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2011-12-10 08:00:26 +0100 |
commit | 1a2932ba2915c34171581a85afba39311e9c3ac6 (patch) | |
tree | 1dcc81f67e4b4f94ed2bb3231ec4e96b88700c57 /tests/testtreechanging.c | |
parent | e01af5c5c97517ce6d85147bb07460db48ec997c (diff) | |
download | gtk+-1a2932ba2915c34171581a85afba39311e9c3ac6.tar.gz |
treeview: Handle the case where the cursor row gets deleted
Previously, the cursor would just become invalid, which used to
reselect the first row in the treeview later on (without a
cursor-changed signal). This leads to a crash now with the recent
refactorings.
The patch is longer than I'd like it to be, but the situation is kinda
complicated, because we want to make sure to move the cursor to a good
row. It works like this:
1) From the deleted row, search forward for the first row that is not
going to be deleted and is not a separator.
2) If no such row exists, search backwards for a row that is not a
separator.
3) If no such node exists, clear the cursor.
Diffstat (limited to 'tests/testtreechanging.c')
0 files changed, 0 insertions, 0 deletions