logic: Scroll active definition to top of code view is possible
* don't log hande message * fixed graph gets animated when using next and previous code reference shortcuts * fixed message scroll code handling
This commit is contained in:
@@ -275,6 +275,31 @@ uint QtCodeArea::getLineNumberForLocationId(Id locationId) const
|
||||
return 0;
|
||||
}
|
||||
|
||||
int QtCodeArea::getStartLineNumberOfFirstActiveScope() const
|
||||
{
|
||||
int firstActiveLine = 0;
|
||||
for (const Annotation& annotation : m_annotations)
|
||||
{
|
||||
if (annotation.locationType == LocationType::LOCATION_SCOPE && annotation.isActive)
|
||||
{
|
||||
if (firstActiveLine && firstActiveLine != annotation.startLine)
|
||||
{
|
||||
return annotation.startLine;
|
||||
}
|
||||
else
|
||||
{
|
||||
return getStartLineNumber();
|
||||
}
|
||||
}
|
||||
else if (annotation.isActive)
|
||||
{
|
||||
firstActiveLine = annotation.startLine;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
QRectF QtCodeArea::getLineRectForLineNumber(uint lineNumber) const
|
||||
{
|
||||
if (lineNumber < getStartLineNumber())
|
||||
|
||||
Reference in New Issue
Block a user