From 3d4ba04e8a9c95655c01fc35239bbf99f1742764 Mon Sep 17 00:00:00 2001 From: pizzaboxer Date: Sat, 31 Aug 2024 11:30:14 +0100 Subject: [PATCH] Bugfix: ordering by column in the flag editor --- Bloxstrap/Integrations/ActivityWatcher.cs | 1 - .../UI/Elements/Settings/Pages/FastFlagEditorPage.xaml.cs | 8 +++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Bloxstrap/Integrations/ActivityWatcher.cs b/Bloxstrap/Integrations/ActivityWatcher.cs index f1ab955..36d4bcf 100644 --- a/Bloxstrap/Integrations/ActivityWatcher.cs +++ b/Bloxstrap/Integrations/ActivityWatcher.cs @@ -89,7 +89,6 @@ namespace Bloxstrap.Integrations if (logFileInfo.CreationTime.AddSeconds(15) > DateTime.Now) break; - // TODO: report failure after 10 seconds of no log file App.Logger.WriteLine(LOG_IDENT, $"Could not find recent enough log file, waiting... (newest is {logFileInfo.Name})"); await Task.Delay(1000); } diff --git a/Bloxstrap/UI/Elements/Settings/Pages/FastFlagEditorPage.xaml.cs b/Bloxstrap/UI/Elements/Settings/Pages/FastFlagEditorPage.xaml.cs index b9bc747..cad94ba 100644 --- a/Bloxstrap/UI/Elements/Settings/Pages/FastFlagEditorPage.xaml.cs +++ b/Bloxstrap/UI/Elements/Settings/Pages/FastFlagEditorPage.xaml.cs @@ -307,12 +307,10 @@ namespace Bloxstrap.UI.Elements.Settings.Pages private void DataGrid_CellEditEnding(object sender, DataGridCellEditEndingEventArgs e) { - int index = e.Row.GetIndex(); - FastFlag entry = _fastFlagList[index]; - - var textbox = e.EditingElement as TextBox; + if (e.Row.DataContext is not FastFlag entry) + return; - if (textbox is null) + if (e.EditingElement is not TextBox textbox) return; switch (e.Column.Header)