Fix flags for invalid LayerTreeModel index

.. bug reported by ModelTester
This commit is contained in:
Sandro Santilli 2014-12-19 12:55:34 +01:00
parent 78ffe02ef8
commit 8f35a27de3

View File

@ -301,7 +301,7 @@ Qt::ItemFlags QgsLayerTreeModel::flags( const QModelIndex& index ) const
{ {
if ( !index.isValid() ) if ( !index.isValid() )
{ {
Qt::ItemFlags rootFlags = Qt::ItemIsEnabled | Qt::ItemIsSelectable; Qt::ItemFlags rootFlags = 0;
if ( testFlag( AllowNodeReorder ) ) if ( testFlag( AllowNodeReorder ) )
rootFlags |= Qt::ItemIsDropEnabled; rootFlags |= Qt::ItemIsDropEnabled;
return rootFlags; return rootFlags;