From 1963c1a92286838c1f1e1610c3c719be4281df35 Mon Sep 17 00:00:00 2001 From: Kalakoi Date: Thu, 22 May 2025 11:37:43 -0400 Subject: [PATCH] Reverted overlay update to run synchronously to fix issue with accessing objects from different threads --- osrs-toolbox/ViewModels/CompetitionOverlayViewModel.cs | 2 +- osrs-toolbox/Views/CompetitionOverlayView.xaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/osrs-toolbox/ViewModels/CompetitionOverlayViewModel.cs b/osrs-toolbox/ViewModels/CompetitionOverlayViewModel.cs index 0a27de1..80e4ca7 100644 --- a/osrs-toolbox/ViewModels/CompetitionOverlayViewModel.cs +++ b/osrs-toolbox/ViewModels/CompetitionOverlayViewModel.cs @@ -50,7 +50,7 @@ namespace osrs_toolbox { DispatcherTimer dt = new DispatcherTimer(); dt.Interval = TimeSpan.FromSeconds(5); - dt.Tick += new EventHandler(TimerTickAsync); + dt.Tick += new EventHandler(TimerTick); dt.Start(); } diff --git a/osrs-toolbox/Views/CompetitionOverlayView.xaml b/osrs-toolbox/Views/CompetitionOverlayView.xaml index b188f76..45bb0d2 100644 --- a/osrs-toolbox/Views/CompetitionOverlayView.xaml +++ b/osrs-toolbox/Views/CompetitionOverlayView.xaml @@ -5,7 +5,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:osrs_toolbox" mc:Ignorable="d" - Title="Competition Info" Height="800" Width="500" AllowsTransparency="True" Background="Transparent" WindowStyle="None" ResizeMode="CanResizeWithGrip" MouseDown="Window_MouseDown"> + Title="Competition Info" Height="800" Width="500" AllowsTransparency="True" Background="Transparent" WindowStyle="None" ResizeMode="NoResize" SizeToContent="WidthAndHeight" MouseDown="Window_MouseDown">