Made the edit box only retain its internal undo history for changes made since the last commit or line switch rather than every state it has had since the program was started, fixing a gradual memory leak.

Originally committed to SVN as r3097.
This commit is contained in:
Thomas Goyne 2009-07-04 01:46:06 +00:00
parent 1cb43ba5c7
commit 349dd2cfe4

View file

@ -304,6 +304,8 @@ void SubsEditBox::Update (bool timeOnly,bool weak) {
// Video
VideoContext::Get()->curLine = curdiag;
VideoContext::Get()->UpdateDisplays(false);
TextEdit->EmptyUndoBuffer();
}
else enabled = false;
}
@ -375,6 +377,8 @@ void SubsEditBox::SetToLine(int n,bool weak) {
if (cur) VideoContext::Get()->JumpToFrame(VFR_Output.GetFrameAtTime(cur->Start.GetMS(),true));
}
}
TextEdit->EmptyUndoBuffer();
}