We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99312bf commit 646582eCopy full SHA for 646582e
Gui/ViewModels/FolderTreeViewModel.cs
@@ -1,6 +1,7 @@
1
using Avalonia.Controls;
2
using Avalonia.Controls.Models.TreeDataGrid;
3
using Avalonia.Controls.Selection;
4
+using Avalonia.Threading;
5
using OpenLoco.Dat.Data;
6
using OpenLoco.Definitions.Database;
7
using OpenLoco.Definitions.Web;
@@ -239,7 +240,10 @@ void UpdateGrid(List<FileSystemItemBase> items)
239
240
},
241
};
242
- TreeDataGridSource.RowSelection!.SelectionChanged += SelectionChanged;
243
+ Dispatcher.UIThread.Invoke(new Action(() =>
244
+ {
245
+ TreeDataGridSource.RowSelection!.SelectionChanged += SelectionChanged;
246
+ }));
247
248
this.RaisePropertyChanged(nameof(TreeDataGridSource));
249
0 commit comments