ui: code view scrolls directly to active line

This change makes the code view first look for the rect of the first active line and then tries to scroll this line into
the middle of the view.
This commit is contained in:
Eberhard Graether
2015-11-13 10:39:30 +01:00
parent de4f2973bc
commit df7c5ea9b7
12 changed files with 72 additions and 68 deletions
@@ -155,12 +155,12 @@ void CodeController::handleMessage(MessageShowScope* message)
return;
}
getView()->addCodeSnippets(snippets);
getView()->addCodeSnippets(snippets, true);
}
void CodeController::handleMessage(MessageShowSnippets* message)
{
getView()->addCodeSnippets(getSnippetsForActiveTokenLocationsInFile(message->locationFile));
getView()->addCodeSnippets(getSnippetsForActiveTokenLocationsInFile(message->locationFile), false);
}
CodeView* CodeController::getView()