|
39 | 39 |
|
40 | 40 | QgsComposerMap::QgsComposerMap( QgsComposition *composition, int x, int y, int width, int height ) |
41 | 41 | : QgsComposerItem( x, y, width, height, composition ), mKeepLayerSet( false ), |
42 | | - mOverviewFrameMapId( -1 ), mGridEnabled( false ), mGridStyle( Solid ), |
| 42 | + mOverviewFrameMapId( -1 ), mGridEnabled( false ), mGridStyle( Solid ), |
43 | 43 | mGridIntervalX( 0.0 ), mGridIntervalY( 0.0 ), mGridOffsetX( 0.0 ), mGridOffsetY( 0.0 ), mGridAnnotationPrecision( 3 ), mShowGridAnnotation( false ), |
44 | 44 | mLeftGridAnnotationPosition( OutsideMapFrame ), mRightGridAnnotationPosition( OutsideMapFrame ), mTopGridAnnotationPosition( OutsideMapFrame ), |
45 | 45 | mBottomGridAnnotationPosition( OutsideMapFrame ), mAnnotationFrameDistance( 1.0 ), mLeftGridAnnotationDirection( Horizontal ), mRightGridAnnotationDirection( Horizontal ), |
46 | 46 | mTopGridAnnotationDirection( Horizontal ), mBottomGridAnnotationDirection( Horizontal ), mGridFrameStyle( NoGridFrame ), mGridFrameWidth( 2.0 ), |
47 | | - mCrossLength( 3 ), mMapCanvas( 0 ), mDrawCanvasItems( true ), |
48 | | - mAtlasHideCoverage( false ), mAtlasFixedScale( false ), mAtlasMargin( 0.10 ), mAtlasFilenamePattern("'output_'||$feature"), mAtlasCoverageLayer(0), mAtlasSingleFile( false ) |
| 47 | + mCrossLength( 3 ), mMapCanvas( 0 ), mDrawCanvasItems( true ), |
| 48 | + mAtlasHideCoverage( false ), mAtlasFixedScale( false ), mAtlasMargin( 0.10 ), mAtlasFilenamePattern( "'output_'||$feature" ), mAtlasCoverageLayer( 0 ), mAtlasSingleFile( false ) |
49 | 49 | { |
50 | 50 | mComposition = composition; |
51 | 51 | mOverviewFrameMapSymbol = 0; |
@@ -86,8 +86,8 @@ QgsComposerMap::QgsComposerMap( QgsComposition *composition ) |
86 | 86 | mLeftGridAnnotationPosition( OutsideMapFrame ), mRightGridAnnotationPosition( OutsideMapFrame ), mTopGridAnnotationPosition( OutsideMapFrame ), |
87 | 87 | mBottomGridAnnotationPosition( OutsideMapFrame ), mAnnotationFrameDistance( 1.0 ), mLeftGridAnnotationDirection( Horizontal ), mRightGridAnnotationDirection( Horizontal ), |
88 | 88 | mTopGridAnnotationDirection( Horizontal ), mBottomGridAnnotationDirection( Horizontal ), mGridFrameStyle( NoGridFrame ), mGridFrameWidth( 2.0 ), mCrossLength( 3 ), |
89 | | - mMapCanvas( 0 ), mDrawCanvasItems( true ), |
90 | | - mAtlasHideCoverage( false ), mAtlasFixedScale( false ), mAtlasMargin( 0.10 ), mAtlasFilenamePattern("'output_'||$feature"), mAtlasCoverageLayer(0), mAtlasSingleFile( false ) |
| 89 | + mMapCanvas( 0 ), mDrawCanvasItems( true ), |
| 90 | + mAtlasHideCoverage( false ), mAtlasFixedScale( false ), mAtlasMargin( 0.10 ), mAtlasFilenamePattern( "'output_'||$feature" ), mAtlasCoverageLayer( 0 ), mAtlasSingleFile( false ) |
91 | 91 | { |
92 | 92 | mOverviewFrameMapSymbol = 0; |
93 | 93 | createDefaultOverviewFrameSymbol(); |
@@ -762,7 +762,7 @@ bool QgsComposerMap::writeXML( QDomElement& elem, QDomDocument & doc ) const |
762 | 762 | atlasElem.setAttribute( "hideCoverage", mAtlasHideCoverage ? "true" : "false" ); |
763 | 763 | atlasElem.setAttribute( "fixedScale", mAtlasFixedScale ? "true" : "false" ); |
764 | 764 | atlasElem.setAttribute( "singleFile", mAtlasSingleFile ? "true" : "false" ); |
765 | | - atlasElem.setAttribute( "margin", QString::number(mAtlasMargin) ); |
| 765 | + atlasElem.setAttribute( "margin", QString::number( mAtlasMargin ) ); |
766 | 766 | atlasElem.setAttribute( "filenamePattern", mAtlasFilenamePattern ); |
767 | 767 |
|
768 | 768 | composerMapElem.appendChild( atlasElem ); |
@@ -918,10 +918,10 @@ bool QgsComposerMap::readXML( const QDomElement& itemElem, const QDomDocument& d |
918 | 918 | QMap<QString, QgsMapLayer*> layers = QgsMapLayerRegistry::instance()->mapLayers(); |
919 | 919 | for ( QMap<QString, QgsMapLayer*>::const_iterator it = layers.begin(); it != layers.end(); ++it ) |
920 | 920 | { |
921 | | - if ( it.key() == atlasElem.attribute("coverageLayer") ) |
| 921 | + if ( it.key() == atlasElem.attribute( "coverageLayer" ) ) |
922 | 922 | { |
923 | | - mAtlasCoverageLayer = dynamic_cast<QgsVectorLayer*>(it.value()); |
924 | | - break; |
| 923 | + mAtlasCoverageLayer = dynamic_cast<QgsVectorLayer*>( it.value() ); |
| 924 | + break; |
925 | 925 | } |
926 | 926 | } |
927 | 927 | mAtlasMargin = atlasElem.attribute( "margin", "0.0" ).toDouble(); |
|
0 commit comments