Commit f308050c authored by Daniel Teske's avatar Daniel Teske

ITextMark: Fix crash with invisible marks

Task-number: QTCREATORBUG-7884

Change-Id: I40525b2d35e7c5a806d4047bd5b503937798da0b
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent aa645254
......@@ -86,6 +86,7 @@ bool DocumentMarker::addMark(TextEditor::ITextMark *mark)
mark->updateLineNumber(blockNumber + 1);
QTC_CHECK(mark->lineNumber() == blockNumber + 1); // Checks that the base class is called
mark->updateBlock(block);
mark->setMarkableInterface(this);
if (!mark->visible())
return true;
// Update document layout
......@@ -97,7 +98,6 @@ bool DocumentMarker::addMark(TextEditor::ITextMark *mark)
documentLayout->requestUpdate();
else
documentLayout->requestExtraAreaUpdate();
mark->setMarkableInterface(this);
return true;
}
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment