Make SubtitlesGrid::InsertLine() smarter about updating maps, saves quite a lot of time on big insertions.

Originally committed to SVN as r4609.
This commit is contained in:
Niels Martin Hansen 2010-06-26 15:49:05 +00:00
parent 22de62de77
commit c5c306f90c

View file

@ -875,7 +875,8 @@ void SubtitlesGrid::InsertLine(AssDialogue *line,int n,bool after,bool update) {
else pos = ass->Line.end(); else pos = ass->Line.end();
entryIter newIter = ass->Line.insert(pos,line); entryIter newIter = ass->Line.insert(pos,line);
UpdateMaps(); line_iter_map[line] = newIter;
BaseGrid::UpdateMaps();
// Update // Update
if (update) { if (update) {