Skip to content

Commit

Permalink
Fix flags for invalid LayerTreeModel index
Browse files Browse the repository at this point in the history
.. bug reported by ModelTester
  • Loading branch information
Sandro Santilli committed Dec 19, 2014
1 parent 78ffe02 commit 8f35a27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/layertree/qgslayertreemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ Qt::ItemFlags QgsLayerTreeModel::flags( const QModelIndex& index ) const
{
if ( !index.isValid() )
{
Qt::ItemFlags rootFlags = Qt::ItemIsEnabled | Qt::ItemIsSelectable;
Qt::ItemFlags rootFlags = 0;
if ( testFlag( AllowNodeReorder ) )
rootFlags |= Qt::ItemIsDropEnabled;
return rootFlags;
Expand Down

0 comments on commit 8f35a27

Please sign in to comment.