Skip to content
Permalink
Browse files

Add support for testing LayerTreeModel from the app

  • Loading branch information
Sandro Santilli
Sandro Santilli committed Dec 19, 2014
1 parent 98e8f03 commit 78ffe02ef81cff465851f55181aacd21940a6e69
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/app/qgisapp.cpp
@@ -211,6 +211,10 @@
#include "qgsosmimportdialog.h"
#include "qgsosmexportdialog.h"

#ifdef ENABLE_MODELTEST
#include "modeltest.h"
#endif

//
// GDAL/OGR includes
//
@@ -2324,6 +2328,9 @@ void QgisApp::initLayerTreeView()
mLayerTreeDock->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );

QgsLayerTreeModel* model = new QgsLayerTreeModel( QgsProject::instance()->layerTreeRoot(), this );
#ifdef ENABLE_MODELTEST
new ModelTest( model, this );
#endif
model->setFlag( QgsLayerTreeModel::AllowNodeReorder );
model->setFlag( QgsLayerTreeModel::AllowNodeRename );
model->setFlag( QgsLayerTreeModel::AllowNodeChangeVisibility );

0 comments on commit 78ffe02

Please sign in to comment.
You can’t perform that action at this time.