DIYGrid - don't invoke SelectionChanged callback unless it is actually coming from the DIYGrid (i.e., not some random child control)
This commit is contained in:
1 parent
64164db22e
commit
4ef8aaa689
1 file changed
+4
-1
@@ -862,7 +862,10 @@ namespace mbts.ui.controls {
|
||||
if (selection_handler != null && owner._row_presenter is ListBox rp) {
|
||||
rp.SelectionChanged += on_selection_changed;
|
||||
_hooks.Add(Disposable.Create(() => rp.SelectionChanged -= on_selection_changed));
|
||||
void on_selection_changed(object sender, SelectionChangedEventArgs e) => selection_handler.row_selection_changed(e);
|
||||
void on_selection_changed(object sender, SelectionChangedEventArgs e) {
|
||||
if (e.OriginalSource == rp)
|
||||
selection_handler.row_selection_changed(e);
|
||||
}
|
||||
}
|
||||
if (sorting_handler != null) {
|
||||
owner.Sorting += sorting_handler.on_sorting;
|
||||
|
||||
Reference in new issue
Block a user