Skip to content
Extraits de code Groupes Projets
Valider 10334272 rédigé par Thomas Goyne's avatar Thomas Goyne
Parcourir les fichiers

Made the edit box only retain its internal undo history for changes made since...

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.
parent 4dc14ed9
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -304,6 +304,8 @@ void SubsEditBox::Update (bool timeOnly,bool weak) { ...@@ -304,6 +304,8 @@ void SubsEditBox::Update (bool timeOnly,bool weak) {
// Video // Video
VideoContext::Get()->curLine = curdiag; VideoContext::Get()->curLine = curdiag;
VideoContext::Get()->UpdateDisplays(false); VideoContext::Get()->UpdateDisplays(false);
TextEdit->EmptyUndoBuffer();
} }
else enabled = false; else enabled = false;
} }
...@@ -375,6 +377,8 @@ void SubsEditBox::SetToLine(int n,bool weak) { ...@@ -375,6 +377,8 @@ void SubsEditBox::SetToLine(int n,bool weak) {
if (cur) VideoContext::Get()->JumpToFrame(VFR_Output.GetFrameAtTime(cur->Start.GetMS(),true)); if (cur) VideoContext::Get()->JumpToFrame(VFR_Output.GetFrameAtTime(cur->Start.GetMS(),true));
} }
} }
TextEdit->EmptyUndoBuffer();
} }
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter