Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gtk fix various treeview bugs #2643

Merged
merged 8 commits into from Apr 15, 2024

Conversation

LeeARichardson
Copy link

@LeeARichardson LeeARichardson commented Apr 15, 2024

Fix a couple of selection related bugs in the Grid

If you switched to Multi mode, unselected everything, and switched back to Single then you could no longer select anything. I reproduced this in raw GtkSharp but I can't find the cause so this is a workaround. I don't think this would break anything if the underlying issue were fixed.

If you switched to Multi and back to Single you could no longer unselect anything. This was due to AllowMultipleSelection starting in Single but setting Browse.


Fix inability to select bottom row of GridView

This was caused by the header height not being taken into consideration. I did the fixes for the above issues in such a way as to remove the need for the mouse click handler altogether. That handler didn't account for unselecting with the keyboard anyway.


These fixes also address (I believe):
#2335
#2401
#2443

and potentially some others but there are too many for me to check.

There are many inconsistencies between the platforms for what happens to the selection on switching modes or which events fire under which conditions. I've just tried to be sensible for what was already happening between Eto, Eto.Gtk, and GtkSharp and any other issues need to be addressed separately.

Lee Richardson added 6 commits April 12, 2024 21:17
If you switched to Multi mode, unselected everything, and switched back to Single then you could no longer select anything. I reproduced this in raw GtkSharp but I can't find the cause so this is a workaround.

If you switched to Multi and back to Single you could no longer unselect anything. This was due to AllowMultipleSelection starting in Single but setting Browse.
If the cursor is on an unselected row then select nothing.
@LeeARichardson LeeARichardson marked this pull request as ready for review April 15, 2024 12:16
@cwensley
Copy link
Member

Hey @LeeARichardson, this looks great! Thanks for the contribution. Only thing I'd recommend is checking if the path from GetCursor() is null before using it, as it looks like that API can return nulls.. e.g. if there's no data.

@cwensley
Copy link
Member

Great! Thank you for the quick edits. 🙏

@cwensley cwensley merged commit 4721256 into picoe:develop Apr 15, 2024
3 checks passed
@cwensley cwensley modified the milestone: 2.8.4 May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants