ui: Fixed expanding file with errors showed all locations as errors

This commit is contained in:
Eberhard Graether
2016-03-11 13:52:24 +01:00
parent a8aaf6950f
commit 8c9b9355d5
6 changed files with 31 additions and 9 deletions
+9 -4
View File
@@ -139,6 +139,11 @@ const std::vector<std::string>& QtCodeFile::getErrorMessages() const
return m_parent->getErrorMessages();
}
bool QtCodeFile::hasErrors() const
{
return getErrorMessages().size() > 0;
}
void QtCodeFile::addCodeSnippet(const CodeSnippetParams& params)
{
m_locationFile.reset();
@@ -376,7 +381,7 @@ void QtCodeFile::clickedMinimizeButton() const
m_filePath,
MessageChangeFileView::FILE_MINIMIZED,
false,
false,
hasErrors(),
nullptr
).dispatch();
}
@@ -387,7 +392,7 @@ void QtCodeFile::clickedSnippetButton() const
m_filePath,
MessageChangeFileView::FILE_SNIPPETS,
(m_locationFile != nullptr),
false,
hasErrors(),
m_locationFile
).dispatch();
}
@@ -398,7 +403,7 @@ void QtCodeFile::clickedMaximizeButton() const
m_filePath,
MessageChangeFileView::FILE_MAXIMIZED,
(m_fileSnippet == nullptr),
false,
hasErrors(),
nullptr
).dispatch();
}
@@ -416,7 +421,7 @@ void QtCodeFile::requestSnippets() const
m_filePath,
MessageChangeFileView::FILE_SNIPPETS,
(m_locationFile != nullptr),
false,
hasErrors(),
m_locationFile
);
msg.undoRedoType = MessageBase::UNDOTYPE_IGNORE;