forked from qt-creator/qt-creator
QmlOutline: Cut down update times considerably
Cut down update times of Outline by a magnitude by only emitting itemChanged signal if absolutely needed. This doesn't include the change of the icon, because QIcon is missing a comparison operator ...
This commit is contained in:
@@ -158,7 +158,12 @@ void QmlJSOutlineWidget::updateSelectionInText(const QItemSelection &selection)
|
||||
|
||||
if (!selection.indexes().isEmpty()) {
|
||||
QModelIndex index = selection.indexes().first();
|
||||
AST::SourceLocation location = index.data(QmlOutlineModel::SourceLocationRole).value<AST::SourceLocation>();
|
||||
QModelIndex sourceIndex = m_filterModel->mapToSource(index);
|
||||
|
||||
AST::SourceLocation location = m_editor->outlineModel()->sourceLocation(sourceIndex);
|
||||
|
||||
if (!location.isValid())
|
||||
return;
|
||||
|
||||
Core::EditorManager *editorManager = Core::EditorManager::instance();
|
||||
editorManager->cutForwardNavigationHistory();
|
||||
|
||||
Reference in New Issue
Block a user