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] Error when trying to select row in GridView #2443

Open
Serg-Norseman opened this issue Mar 14, 2023 · 3 comments
Open

[GTK] Error when trying to select row in GridView #2443

Serg-Norseman opened this issue Mar 14, 2023 · 3 comments

Comments

@Serg-Norseman
Copy link
Contributor

Serg-Norseman commented Mar 14, 2023

Expected Behavior

Highlight the selected row in the GridView when the left (primary) mouse button is clicked.

Actual Behavior

I'm using a GridView, when I click (left button, main) on the last row, the selected row is not highlighted. When I right click on the same row, a selection happens.

Not highlighting a line when clicking with the left button occurs only if this line is the only one or the last one in the list. From the first to the penultimate everything works correctly.

Code that Demonstrates the Problem

Verified with Eto.Test.Gtk.exe - the last one row (9999) is not clickable (but Down key is working).

Specifications

  • Version: 2.7.1-2.7.3
  • Platform(s): Gtk
  • Operating System(s): Linux Mint
@Serg-Norseman
Copy link
Contributor Author

Maybe it's the same problem: #2401 and #2335?

@Serg-Norseman
Copy link
Contributor Author

Serg-Norseman commented Mar 28, 2023

Debugging in Eto.Test.Gtk.exe showed that this behavior occurs with AllowEmptySelection, call chain:
GridHandler.Widget_MouseDown() -> AllowEmptySelection=true -> !Control.GetPathAtPos() -> UnselectAll();

If AllowEmptySelection is disabled, the last line is selected normally.

It's up to you to decide if it's a bug or not. And I need to decide - is it permissible for my application to turn off AllowEmptySelection... On good, in my application it is impossible to turn off AllowEmptySelection - violation of the logic of the program.

@Serg-Norseman
Copy link
Contributor Author

Serg-Norseman commented Mar 28, 2023

Given that GetPathAtPos is a Gtk.TreeView method, the question is why does it think that the click was not on an existing row?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant