Skip to content

Commit 5c02c5c

Browse files
committed
make object type editable in s5 view model
1 parent 3d0f090 commit 5c02c5c

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Gui/ViewModels/DatTypes/ILocoFileViewModel.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ public interface ILocoFileViewModel
2626
public FileSystemItem CurrentFile { get; init; }
2727

2828
[Reactive]
29-
public bool IsLocalMode => CurrentFile.FileLocation == FileLocation.Local;
29+
public bool IsLocalMode
30+
=> CurrentFile.FileLocation == FileLocation.Local;
3031

3132
public string ReloadText { get; }
3233
public string SaveText { get; }

Gui/ViewModels/DatTypes/S5HeaderViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public S5HeaderViewModel(S5Header s5Header)
4141
[Reactive]
4242
public SourceGame SourceGame { get; set; }
4343

44-
[Reactive, ReadOnly(true)]
44+
[Reactive]
4545
public ObjectType ObjectType { get; set; }
4646

4747
public S5Header GetAsUnderlyingType()

Gui/Views/MainWindow.axaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
x:Class="OpenLoco.Gui.Views.MainWindow"
2525
x:DataType="vm:MainWindowViewModel"
2626
Icon="/Assets/loco_icon.png"
27-
Title="{Binding WindowTitle}">
27+
Title="{Binding WindowTitle}"
28+
>
29+
<!-- https://docs.avaloniaui.net/docs/0.10.x/tutorials/music-store-app/creating-a-modern-looking-window -->
2830

2931
<Design.DataContext>
3032
<vm:MainWindowViewModel/>

0 commit comments

Comments
 (0)