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:
parent
22de62de77
commit
c5c306f90c
1 changed files with 2 additions and 1 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue