This commit is contained in:
2025-11-16 22:34:14 +01:00
parent da79ada91e
commit 72a81e05ad
2 changed files with 7 additions and 4 deletions

View File

@@ -138,9 +138,12 @@ public partial class MainWindow : Window, IMainApi
|| Model.CurrentTreeNodes?.ElementAtOrDefault(1) is not { } nodeUpdates) || Model.CurrentTreeNodes?.ElementAtOrDefault(1) is not { } nodeUpdates)
return; return;
var update = new UpdateInfo(); var update = new UpdateInfo
Model.CurrentWorkspace.UpdateInfos.Updates.Add(update); {
nodeUpdates.Nodes.Add(new ActionSetTreeNode(update)); Version = new(),
};
Model.CurrentWorkspace.UpdateInfos.Updates.Insert(0, update);
nodeUpdates.Nodes.Insert(0, new ActionSetTreeNode(update));
} }
private void MenuItemRemoveUpdate_OnClick(object? sender, RoutedEventArgs e) private void MenuItemRemoveUpdate_OnClick(object? sender, RoutedEventArgs e)

View File

@@ -35,7 +35,7 @@ public class SimpleMainWindowTreeNode(string text) : MainWindowTreeNode
public class ActionSetTreeNode(IActionSetInfos infos) : MainWindowTreeNode public class ActionSetTreeNode(IActionSetInfos infos) : MainWindowTreeNode
{ {
private string editVersion = infos.Version.ToString(); private string editVersion = infos.Version?.ToString() ?? string.Empty;
public override string DisplayText => infos.Version.ToString(); public override string DisplayText => infos.Version.ToString();
public IActionSetInfos Infos => infos; public IActionSetInfos Infos => infos;