forked from qt-creator/qt-creator
LanguageClient: Improve outline
For non-hierarchical symbols probably no difference, but language servers providing hierarchical document symbols will benefit. Change-Id: Icab7ac74a7780ee72c556955867a0ad7da3d8a02 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -155,6 +155,7 @@ LanguageClientOutlineWidget::LanguageClientOutlineWidget(Client *client,
|
||||
setLayout(layout);
|
||||
m_view.setModel(&m_model);
|
||||
m_view.setHeaderHidden(true);
|
||||
m_view.setExpandsOnDoubleClick(false);
|
||||
connect(&m_view, &QAbstractItemView::activated,
|
||||
this, &LanguageClientOutlineWidget::onItemActivated);
|
||||
connect(m_editor->editorWidget(), &TextEditor::TextEditorWidget::cursorPositionChanged,
|
||||
@@ -317,6 +318,7 @@ void OutlineComboBox::updateModel(const DocumentUri &resultUri, const DocumentSy
|
||||
else
|
||||
m_model.clear();
|
||||
|
||||
view()->expandAll();
|
||||
// The list has changed, update the current item
|
||||
updateEntry();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user