fix broken combat zone window

This commit is contained in:
Florian Stinglmayr 2022-01-10 08:03:51 +01:00
parent b7ac0c1edc
commit 0180a63a1f

View File

@ -249,8 +249,7 @@ namespace EliteBGS {
return; return;
} }
TreeViewItem item = entries.SelectedItem as TreeViewItem; var obj = entries.SelectedItem;
var obj = item.Tag;
if (obj.GetType() != typeof(Objective)) { if (obj.GetType() != typeof(Objective)) {
return; return;
@ -264,16 +263,16 @@ namespace EliteBGS {
return; return;
} }
CombatZone zone = new CombatZone(); CombatZone zone = new CombatZone {
ManuallyAdded = true,
Faction = objective.Faction,
System = objective.System,
Station = objective.Station,
zone.ManuallyAdded = true; Grade = dialog.Grade,
zone.Faction = objective.Faction; Type = dialog.Type,
zone.System = objective.System; Amount = dialog.Amount
zone.Station = objective.Station; };
zone.Grade = dialog.Grade;
zone.Type = dialog.Type;
zone.Amount = dialog.Amount;
objective.LogEntries.Add(zone); objective.LogEntries.Add(zone);
RefreshObjectives(); RefreshObjectives();