forked from qt-creator/qt-creator
TextEditor: reuse resetReloadMarks in documentReloaded
Change-Id: I41721e8c08fa70bf713154d7096753e0f49afb8c Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -674,8 +674,9 @@ void TextDocumentLayout::documentAboutToReload()
|
||||
|
||||
void TextDocumentLayout::documentReloaded(TextDocument *baseTextDocument)
|
||||
{
|
||||
for (TextMark *mark : std::as_const(m_reloadMarks)) {
|
||||
mark->setDeleteCallback({});
|
||||
const TextMarks marks = m_reloadMarks;
|
||||
resetReloadMarks();
|
||||
for (TextMark *mark : marks) {
|
||||
int blockNumber = mark->lineNumber() - 1;
|
||||
QTextBlock block = document()->findBlockByNumber(blockNumber);
|
||||
if (block.isValid()) {
|
||||
@@ -689,7 +690,6 @@ void TextDocumentLayout::documentReloaded(TextDocument *baseTextDocument)
|
||||
mark->removedFromEditor();
|
||||
}
|
||||
}
|
||||
m_reloadMarks.clear();
|
||||
requestUpdate();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user