Skip to content

Commit a3d909e

Browse files
committed
Ability to not store the history in the project
1 parent 62e6b92 commit a3d909e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/classes/updates.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@ def save_history(self, project, history_length):
172172
# Loop through each updateAction object and serialize
173173
# Ignore any load actions or history update actions
174174
history_length_int = int(history_length)
175+
if history_length_int == 0:
176+
self.update_untracked(["history"], {"redo": [], "undo": []})
177+
return
175178
for action in self.redoHistory[-history_length_int:]:
176179
if action.type != "load" and action.key[0] != "history":
177180
actionDict = json.loads(action.json(), strict=False)

0 commit comments

Comments
 (0)