Skip to content

Commit

Permalink
Merge pull request #2547 from cwensley/curtis/mac-fix-treegridview-se…
Browse files Browse the repository at this point in the history
…lected-item-changed

Mac: Fix TreeGridView.SelectedItemChanged
  • Loading branch information
cwensley authored Aug 29, 2023
2 parents 6be061e + f86a56e commit 8fe90bb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Eto.Mac/Forms/Controls/TreeGridViewHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,14 @@ public override void SelectionDidChange(NSNotification notification)
h.Control.ReloadData(selected, columns);
previouslySelected = selected;
}

// trigger when the selected item changes
var item = h.SelectedItem;
if (!ReferenceEquals(item, lastSelected))
{
h.Callback.OnSelectedItemChanged(h.Widget, EventArgs.Empty);
lastSelected = item;
}
}

public override void ItemDidCollapse(NSNotification notification)
Expand Down

0 comments on commit 8fe90bb

Please sign in to comment.