fix: selectedGroupIds not being stored in history (#3630)

thanks!
This commit is contained in:
David Luzar 2021-05-29 21:35:03 +02:00 committed by GitHub
parent d63b6a3469
commit 60cea7a0c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 478 additions and 113 deletions

View file

@ -21,6 +21,7 @@ interface DehydratedHistoryEntry {
const clearAppStatePropertiesForHistory = (appState: AppState) => {
return {
selectedElementIds: appState.selectedElementIds,
selectedGroupIds: appState.selectedGroupIds,
viewBackgroundColor: appState.viewBackgroundColor,
editingLinearElement: appState.editingLinearElement,
editingGroupId: appState.editingGroupId,
@ -169,7 +170,7 @@ class History {
continue;
}
}
if (key === "selectedElementIds") {
if (key === "selectedElementIds" || key === "selectedGroupIds") {
continue;
}
if (nextEntry.appState[key] !== lastEntry.appState[key]) {