tdf#158221 sw: fix performance disaster in SwInsertBookmarkDlg
Moving the shell cursor without Start/EndAction results in formatting
and repainting for every bookmark :(
(regression from commit aa6ec3f796
)
Change-Id: I2eb77a7a6aa48a1f218957245d75399bddb594ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180965
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
This commit is contained in:
@@ -348,6 +348,7 @@ void SwInsertBookmarkDlg::PopulateTable()
|
||||
m_aTableBookmarks.clear();
|
||||
m_xBookmarksBox->clear();
|
||||
|
||||
m_rSh.StartAllAction();
|
||||
IDocumentMarkAccess* const pMarkAccess = m_rSh.getIDocumentMarkAccess();
|
||||
for (auto ppBookmark = pMarkAccess->getBookmarksBegin();
|
||||
ppBookmark != pMarkAccess->getBookmarksEnd(); ++ppBookmark)
|
||||
@@ -358,6 +359,7 @@ void SwInsertBookmarkDlg::PopulateTable()
|
||||
m_aTableBookmarks.emplace_back(*ppBookmark, (*ppBookmark)->GetName());
|
||||
}
|
||||
}
|
||||
m_rSh.EndAllAction();
|
||||
m_nLastBookmarksCount = pMarkAccess->getBookmarksCount();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user