summaryrefslogtreecommitdiff
path: root/tests/testtreechanging.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2011-12-10 04:48:12 +0100
committerBenjamin Otte <otte@redhat.com>2011-12-10 08:00:26 +0100
commit1a2932ba2915c34171581a85afba39311e9c3ac6 (patch)
tree1dcc81f67e4b4f94ed2bb3231ec4e96b88700c57 /tests/testtreechanging.c
parente01af5c5c97517ce6d85147bb07460db48ec997c (diff)
downloadgtk+-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