diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2eb3933..876fb15 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,9 +2,8 @@ on: push: - branches: [ "master" ] - paths-ignore: - - 'README.md' + tags: + - 'v*.*.*' jobs: diff --git a/src/VirtualStreetSnap/ViewModels/MainWindowViewModel.cs b/src/VirtualStreetSnap/ViewModels/MainWindowViewModel.cs index 71d7c0f..befa500 100644 --- a/src/VirtualStreetSnap/ViewModels/MainWindowViewModel.cs +++ b/src/VirtualStreetSnap/ViewModels/MainWindowViewModel.cs @@ -19,7 +19,7 @@ public partial class MainWindowViewModel : ViewModelBase private PagesModel? _currentPage; [ObservableProperty] - private bool _isPaneOpen; + private bool _isPaneOpen = true; [RelayCommand] public void TogglePane() => IsPaneOpen = !IsPaneOpen; diff --git a/src/VirtualStreetSnap/ViewModels/SettingsViewModel.cs b/src/VirtualStreetSnap/ViewModels/SettingsViewModel.cs index 79d3904..36e1102 100644 --- a/src/VirtualStreetSnap/ViewModels/SettingsViewModel.cs +++ b/src/VirtualStreetSnap/ViewModels/SettingsViewModel.cs @@ -13,7 +13,6 @@ namespace VirtualStreetSnap.ViewModels; public partial class SettingsViewModel : ViewModelBase { - [ObservableProperty] private AppConfig _config = ConfigService.Instance; @@ -53,6 +52,7 @@ partial void OnSelectedLanguageChanged(LanguageModel value) public async Task ChangeDir(string parmName) { + var oldValue = SaveDirectory; var task = parmName switch { "SaveDirectory" => this.ChangeDirectory(value => SaveDirectory = value, @@ -61,8 +61,11 @@ public async Task ChangeDir(string parmName) }; await task; // save the config - Config.Settings.SaveDirectory = SaveDirectory; - NotifyHelper.Notify(this, Localizer.Localizer.Instance["ConfigChanged"], - SaveDirectory); + if (oldValue != SaveDirectory) + { + Config.Settings.SaveDirectory = SaveDirectory; + NotifyHelper.Notify(this, Localizer.Localizer.Instance["ConfigChanged"], + SaveDirectory); + } } } \ No newline at end of file diff --git a/src/VirtualStreetSnap/Views/MainWindow.axaml b/src/VirtualStreetSnap/Views/MainWindow.axaml index 34a96c5..2cd9431 100644 --- a/src/VirtualStreetSnap/Views/MainWindow.axaml +++ b/src/VirtualStreetSnap/Views/MainWindow.axaml @@ -30,6 +30,7 @@ +