diff --git a/EstusShots.Gtk/Controls/BindableListControl.cs b/EstusShots.Gtk/Controls/BindableListControl.cs index 53643ac..19e26a8 100644 --- a/EstusShots.Gtk/Controls/BindableListControl.cs +++ b/EstusShots.Gtk/Controls/BindableListControl.cs @@ -37,7 +37,7 @@ namespace EstusShots.Gtk.Controls TreeView.Model = ListStore; Items = new List(); - TreeView.Selection.Changed += TreeView_SelectionChanged; + TreeView.RowActivated += TreeViewOnRowActivated; } /// The GTK ListStore that is managed by this . @@ -99,10 +99,11 @@ namespace EstusShots.Gtk.Controls Console.WriteLine(e); } } - - private void TreeView_SelectionChanged(object sender, EventArgs e) + + private void TreeViewOnRowActivated(object o, RowActivatedArgs args) { - if (!(sender is TreeSelection selection)) return; + if (!(o is TreeView tree)) return; + var selection = tree.Selection; selection.GetSelected(out var model, out var iter); var key = model.GetValue(iter, 0); var item = Items.FirstOrDefault(x =>