Skip to content

Commit 1bad9f1

Browse files
committed
修复实例设置保存失败的问题
1 parent 8670225 commit 1bad9f1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Natsurainko.FluentLauncher/Services/Launch/InstanceConfigService.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public InstanceConfig GetConfig(MinecraftInstance instance)
5151
instanceConfig = JsonNode.Parse(File.ReadAllText(configFile))
5252
.Deserialize(InstanceConfigSerializerContext.Default.InstanceConfig)
5353
?? throw new InvalidDataException();
54+
instanceConfig.FilePath = configFile;
5455
}
5556
catch
5657
{

Natsurainko.FluentLauncher/Views/Instances/ConfigPage.xaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,10 @@
173173
<DataTemplate x:DataType="x:String">
174174
<controls:SettingsCard>
175175
<controls:SettingsCard.Header>
176-
<TextBlock Text="{x:Bind}" TextTrimming="CharacterEllipsis" />
176+
<TextBlock
177+
IsTextSelectionEnabled="True"
178+
Text="{x:Bind}"
179+
TextTrimming="CharacterEllipsis" />
177180
</controls:SettingsCard.Header>
178181
<Button Grid.Column="2" CommandParameter="{x:Bind}">
179182
<StackPanel Orientation="Horizontal" Spacing="5">

0 commit comments

Comments
 (0)