Skip to content

Commit 3fdcd65

Browse files
committed
respect dat vanilla header and show it as such in UI
1 parent 8bf0fe4 commit 3fdcd65

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Gui/ViewModels/LocoTypes/ObjectEditorViewModel.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,13 @@ public override void Load()
278278
{
279279
ObjectModelHeaderViewModel = new ObjectModelHeaderViewModel(CurrentObject.DatInfo.S5Header.Convert());
280280

281+
// an object saved as 'Vanilla' but isn't truly Vanilla will have its source auto-set to Custom
282+
// but in this case, we do want to show the user this, so we'll default to Steam
283+
if (CurrentObject.DatInfo.S5Header.ObjectSource == DatObjectSource.Vanilla && ObjectModelHeaderViewModel.ObjectSource == ObjectSource.Custom)
284+
{
285+
ObjectModelHeaderViewModel.ObjectSource = ObjectSource.LocomotionSteam;
286+
}
287+
281288
ObjectDatHeaderViewModel = new ObjectDatHeaderViewModel(
282289
CurrentObject.DatInfo.S5Header.Checksum,
283290
CurrentObject.DatInfo.ObjectHeader.Encoding,

0 commit comments

Comments
 (0)