Profiles - Fixed resetting state and reset profiles after editing them

This commit is contained in:
Robert committed 2022-08-13 11:18:24 +02:00
1 parent 041ed8e0a0
commit 19d47ec9f5
5 files changed
+36 -3

No files matched your search

@@ -109,7 +109,11 @@ internal class ProfileEditorService : IProfileEditorService
// Stop playing and save the current profile
Pause();
if (_profileConfigurationSubject.Value?.Profile != null)
{
_profileConfigurationSubject.Value.Profile.Reset();
_profileConfigurationSubject.Value.Profile.LastSelectedProfileElement = _profileElementSubject.Value;
}
SaveProfile();
// No need to deactivate the profile, if needed it will be deactivated next update
@@ -173,6 +177,7 @@ internal class ProfileEditorService : IProfileEditorService
{
Pause();
_profileService.RenderForEditor = false;
_profileConfigurationSubject.Value?.Profile?.Reset();
}
else
{