28 , mPendingCanvasUpdate( false )
29 , mHasCustomLayerOrder( false )
30 , mAutoSetupOnFirstLayer( true )
31 , mAutoEnableCrsTransform( true )
32 , mLastLayerCount( root->findLayers().count() )
86 QStringList sortedNewOrder = order;
88 qSort( sortedNewOrder );
89 if ( defOrder != sortedNewOrder )
101 QList<QgsMapCanvasLayer> layers;
116 int currentLayerCount = layerNodes.count();
126 if ( layerNode->
layer() &&
176 mLastLayerCount = currentLayerCount;
177 if ( currentLayerCount == 0 )
185 QDomElement elem = doc.documentElement().firstChildElement(
"layer-tree-canvas" );
189 QStringList oldOrder;
198 QDomElement customOrderElem = elem.firstChildElement(
"custom-order" );
199 if ( !customOrderElem.isNull() )
202 QDomElement itemElem = customOrderElem.firstChildElement(
"item" );
203 while ( !itemElem.isNull() )
205 order.append( itemElem.text() );
206 itemElem = itemElem.nextSiblingElement(
"item" );
216 QDomElement elem = doc.createElement(
"layer-tree-canvas" );
217 QDomElement customOrderElem = doc.createElement(
"custom-order" );
222 QDomElement itemElem = doc.createElement(
"item" );
223 itemElem.appendChild( doc.createTextNode( layerId ) );
224 customOrderElem.appendChild( itemElem );
226 elem.appendChild( customOrderElem );
228 doc.documentElement().appendChild( elem );
249 QMetaObject::invokeMethod(
this,
"setCanvasLayers", Qt::QueuedConnection );
257 QStringList layerIds;
258 QList<QgsLayerTreeNode*> children = node->
children();
259 for (
int i = indexFrom; i <= indexTo; ++i )
273 foreach ( QString layerId, layerIds )
296 for (
int i = toRemove.count() - 1; i >= 0; --i )
311 if ( key ==
"overview" )