logic: Fixed old ErrorInfos on UndoRedoStack showed non-existing errors

This commit is contained in:
Eberhard Graether
2018-04-10 16:04:24 +02:00
parent 648caa9c35
commit 0e451fd768
11 changed files with 28 additions and 42 deletions
@@ -301,12 +301,7 @@ void CodeController::handleMessage(MessageShowErrors* message)
CodeView::ScrollParams scrollParams(CodeView::ScrollParams::SCROLL_TO_DEFINITION);
view->scrollTo(scrollParams);
std::vector<ErrorInfo> errors = message->errors;
if (!errors.size())
{
errors = m_storageAccess->getErrorsLimited();
}
std::vector<ErrorInfo> errors = m_storageAccess->getErrorsLimited(message->errorIds);
m_collection = m_storageAccess->getErrorSourceLocations(errors);
std::vector<CodeSnippetParams> snippets = getSnippetsForCollection(m_collection);