Skip to content

Commit 8be2b25

Browse files
Fix various issues
1 parent afd628c commit 8be2b25

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

MSUScripter/Services/ProjectService.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ public class ProjectService(
2525
{
2626
public void SaveMsuProject(MsuProject project, bool isBackup)
2727
{
28+
var previousLastSaveTime = project.LastSaveTime;
29+
2830
project.LastSaveTime = DateTime.Now;
2931

3032
if (!isBackup)
@@ -79,6 +81,7 @@ public void SaveMsuProject(MsuProject project, bool isBackup)
7981
}
8082
else
8183
{
84+
project.LastSaveTime = previousLastSaveTime;
8285
logger.LogInformation("Saved project backup");
8386
statusBarService.UpdateStatusBar("Backup Created");
8487
}

MSUScripter/Views/MsuSongAdvancedPanel.axaml.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ protected override void OnLoaded(RoutedEventArgs e)
3232
{
3333
base.OnLoaded(e);
3434
_viewModel = DataContext as MsuSongAdvancedPanelViewModel ?? new MsuSongAdvancedPanelViewModel();
35+
Service?.CheckFileErrors(_viewModel);
3536
_viewModel.ViewModelUpdated += (_, _) =>
3637
{
3738
Service?.CheckFileErrors(_viewModel);
@@ -246,6 +247,7 @@ private void AddMsuPcmInfoButton_OnClick(object? sender, RoutedEventArgs e)
246247
}
247248

248249
_viewModel.AddMsuPcmInfo(treeData);
250+
_viewModel.LastModifiedDate = DateTime.Now;
249251
Service?.CheckFileErrors(_viewModel);
250252
}
251253
catch (Exception ex)
@@ -407,6 +409,7 @@ private async void DeleteMsuPcmInfoMenuItem_OnClick(object? sender, RoutedEventA
407409
}
408410

409411
_viewModel.RemoveMsuPcmInfo(treeData);
412+
_viewModel.LastModifiedDate = DateTime.Now;
410413
Service?.CheckFileErrors(_viewModel);
411414
}
412415
catch (Exception ex)

0 commit comments

Comments
 (0)