logic: Improved code view performance

* Don't set stylesheet for every token activation
* Streamlined code area creation steps
* Delay most syntax highlighting until lines become visible
This commit is contained in:
Eberhard Graether
2017-06-05 23:34:20 +02:00
parent 30e6512d71
commit 71b3bdb26b
12 changed files with 217 additions and 123 deletions
+1 -3
View File
@@ -20,7 +20,6 @@
#include "qt/utility/utilityQt.h"
#include "settings/ApplicationSettings.h"
QtCodeNavigator::QtCodeNavigator(QWidget* parent)
: QWidget(parent)
, m_mode(MODE_NONE)
@@ -586,7 +585,7 @@ void QtCodeNavigator::scrollToDefinition(bool animated, bool ignoreActiveReferen
if (!m_activeTokenId)
{
if (m_mode == MODE_SINGLE && m_references.size() && m_references.front().locationType != LOCATION_TOKEN)
if (m_references.size() && m_references.front().locationType != LOCATION_TOKEN)
{
requestScroll(m_references.front().filePath, 0, m_references.front().locationId, false, false);
emit scrollRequest();
@@ -596,7 +595,6 @@ void QtCodeNavigator::scrollToDefinition(bool animated, bool ignoreActiveReferen
if (m_mode == MODE_LIST)
{
std::cout << animated << std::endl;
std::pair<QtCodeSnippet*, Id> result = m_list->getFirstSnippetWithActiveLocationId(m_activeTokenId);
if (result.first != nullptr)
{