Device visualizer - Fix framerate drop when processing mouse events

Profile tree - Fixed potential crash when dragging files over Artemis
Module reorder - Fixed potential crash when dragging files over Artemis
This commit is contained in:
SpoinkyNL committed 2020-12-15 00:05:42 +01:00
1 parent c401bc6525
commit 7ffe8f3e5b
3 files changed
+31 -30

No files matched your search

@@ -53,8 +53,11 @@ namespace Artemis.UI.Screens.Settings.Tabs.Modules
if (dropInfo.TargetItem == dropInfo.Data)
return;
ModuleOrderModuleViewModel viewModel = (ModuleOrderModuleViewModel) dropInfo.Data;
BindableCollection<ModuleOrderModuleViewModel> targetCollection = (BindableCollection<ModuleOrderModuleViewModel>) dropInfo.TargetCollection;
if (!(dropInfo.Data is ModuleOrderModuleViewModel viewModel))
return;
if (!(dropInfo.TargetCollection is BindableCollection<ModuleOrderModuleViewModel> targetCollection))
return;
int insertIndex = dropInfo.InsertIndex;
ModulePriorityCategory category;