Undo Record Bug Fixed

It used to not let the user to start a new project
This commit is contained in:
Jeison Yehuda Amihud (Blender Dumbass) 2021-01-06 20:17:16 +00:00
parent e5299fd76c
commit f57b61f7e6

View file

@ -754,13 +754,13 @@ def undo_record(win):
# This function will not read the files. It's not nessesary. But it will
# make a copy of the whole thing. So I guess we need to implement some kind
# of limiter.
try:
limit = int(win.settings["Undo_Limit"])
# Now let's advance the undo history 1 forward.
win.undo_index = min(len(win.undo_history)+1, limit)
# Let's read our file
# Let's read our file. Which might not exist.
f = open(win.project+'/pln/story.vcss')
win.undo_history.append(f.read())
@ -768,7 +768,8 @@ def undo_record(win):
# And now let's limit our selves
win.undo_history = win.undo_history[0-limit:]
except:
pass
# Following 2 functions are a big buggy at the moment. I will aprecieate if
# someone going to look at them. Maybe it's to do with studio/studio_storyLayer.py