ui: Stay at original line when expanding scope in the code view

bug id = 82
This commit is contained in:
Eberhard Graether
2016-07-22 14:57:36 +02:00
parent f4677a902d
commit 2672299a58
4 changed files with 37 additions and 9 deletions
+6 -3
View File
@@ -173,13 +173,15 @@ std::string QtCodeSnippet::getCode() const
void QtCodeSnippet::clickedTitle()
{
getFile()->setScrollToLine(getStartLineNumber());
if (m_titleId > 0)
{
MessageShowScope(m_titleId, dynamic_cast<QtCodeFile*>(parent())->hasErrors()).dispatch();
MessageShowScope(m_titleId, getFile()->hasErrors()).dispatch();
}
else
{
dynamic_cast<QtCodeFile*>(parent())->clickedMaximizeButton();
getFile()->clickedMaximizeButton();
}
}
@@ -187,7 +189,8 @@ void QtCodeSnippet::clickedFooter()
{
if (m_footerId > 0)
{
MessageShowScope(m_footerId, dynamic_cast<QtCodeFile*>(parent())->hasErrors()).dispatch();
getFile()->setScrollToLine(getEndLineNumber());
MessageShowScope(m_footerId, getFile()->hasErrors()).dispatch();
}
}