diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index 73fc354..eab830e 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -249,8 +249,7 @@ namespace EliteBGS { return; } - TreeViewItem item = entries.SelectedItem as TreeViewItem; - var obj = item.Tag; + var obj = entries.SelectedItem; if (obj.GetType() != typeof(Objective)) { return; @@ -264,16 +263,16 @@ namespace EliteBGS { return; } - CombatZone zone = new CombatZone(); + CombatZone zone = new CombatZone { + ManuallyAdded = true, + Faction = objective.Faction, + System = objective.System, + Station = objective.Station, - zone.ManuallyAdded = true; - zone.Faction = objective.Faction; - zone.System = objective.System; - zone.Station = objective.Station; - - zone.Grade = dialog.Grade; - zone.Type = dialog.Type; - zone.Amount = dialog.Amount; + Grade = dialog.Grade, + Type = dialog.Type, + Amount = dialog.Amount + }; objective.LogEntries.Add(zone); RefreshObjectives();