Skip to content

Commit

Permalink
Add support for testing LayerTreeModel from the app
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandro Santilli committed Dec 19, 2014
1 parent 98e8f03 commit 78ffe02
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -211,6 +211,10 @@
#include "qgsosmimportdialog.h"
#include "qgsosmexportdialog.h"

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

//
// GDAL/OGR includes
//
Expand Down Expand Up @@ -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 );
Expand Down

0 comments on commit 78ffe02

Please sign in to comment.