Commit feb181ce authored by Christiaan Janssen's avatar Christiaan Janssen

QmlDesigner.Navigator: TreeView updated when switching between components in the visual editor

parent 749f57f3
......@@ -32,6 +32,7 @@
#include "navigatorwidget.h"
#include <nodeproperty.h>
#include <QHeaderView>
namespace QmlDesigner {
......@@ -85,6 +86,15 @@ void NavigatorView::modelAttached(Model *model)
m_treeModel->setView(this);
treeWidget()->expandAll();
treeWidget()->header()->setResizeMode(0, QHeaderView::Stretch);
treeWidget()->header()->resizeSection(1,26);
treeWidget()->setRootIsDecorated(false);
treeWidget()->setIndentation(40);
#ifdef _LOCK_ITEMS_
treeWidget()->header()->resizeSection(2,20);
#endif
treeWidget()->setHeaderHidden(true);
}
void NavigatorView::modelAboutToBeDetached(Model *model)
......
......@@ -79,14 +79,6 @@ NavigatorWidget::~NavigatorWidget()
void NavigatorWidget::setTreeModel(QAbstractItemModel* model)
{
m_treeView->setModel(model);
m_treeView->header()->setResizeMode(0, QHeaderView::Stretch);
m_treeView->header()->resizeSection(1,26);
m_treeView->setRootIsDecorated(false);
m_treeView->setIndentation(40);
#ifdef _LOCK_ITEMS_
m_treeView->header()->resizeSection(2,20);
#endif
m_treeView->setHeaderHidden(true);
}
QTreeView *NavigatorWidget::treeView()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment