Undo Record Bug Fixed
It used to not let the user to start a new project
This commit is contained in:
parent
e5299fd76c
commit
f57b61f7e6
1 changed files with 16 additions and 15 deletions
|
@ -754,21 +754,22 @@ def undo_record(win):
|
||||||
# This function will not read the files. It's not nessesary. But it will
|
# 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
|
# make a copy of the whole thing. So I guess we need to implement some kind
|
||||||
# of limiter.
|
# of limiter.
|
||||||
|
try:
|
||||||
limit = int(win.settings["Undo_Limit"])
|
limit = int(win.settings["Undo_Limit"])
|
||||||
|
|
||||||
# Now let's advance the undo history 1 forward.
|
# Now let's advance the undo history 1 forward.
|
||||||
win.undo_index = min(len(win.undo_history)+1, limit)
|
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')
|
f = open(win.project+'/pln/story.vcss')
|
||||||
|
|
||||||
win.undo_history.append(f.read())
|
win.undo_history.append(f.read())
|
||||||
|
|
||||||
# And now let's limit our selves
|
# And now let's limit our selves
|
||||||
|
|
||||||
win.undo_history = win.undo_history[0-limit:]
|
win.undo_history = win.undo_history[0-limit:]
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
# Following 2 functions are a big buggy at the moment. I will aprecieate if
|
# 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
|
# someone going to look at them. Maybe it's to do with studio/studio_storyLayer.py
|
||||||
|
|
Loading…
Reference in a new issue