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;
}
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();