Skip to content
Permalink
Browse files

Restore some more atlas style related UI

  • Loading branch information
nyalldawson committed Dec 20, 2017
1 parent 6506bcd commit 8072d4d35761f26b96dd51cda9770a4987af146c
Showing with 19 additions and 0 deletions.
  1. +11 −0 src/app/layout/qgslayoutmapgridwidget.cpp
  2. +8 −0 src/app/layout/qgslayoutmapwidget.cpp
@@ -149,6 +149,17 @@ QgsLayoutMapGridWidget::QgsLayoutMapGridWidget( QgsLayoutItemMapGrid *mapGrid, Q
connect( mAnnotationFontButton, &QgsFontButton::changed, this, &QgsLayoutMapGridWidget::annotationFontChanged );
connect( mGridLineStyleButton, &QgsSymbolButton::changed, this, &QgsLayoutMapGridWidget::lineSymbolChanged );
connect( mGridMarkerStyleButton, &QgsSymbolButton::changed, this, &QgsLayoutMapGridWidget::markerSymbolChanged );

mGridLineStyleButton->registerExpressionContextGenerator( mMapGrid );
mGridLineStyleButton->setLayer( coverageLayer() );
mGridMarkerStyleButton->registerExpressionContextGenerator( mMapGrid );
mGridMarkerStyleButton->setLayer( coverageLayer() );
if ( mMap->layout() )
{
connect( &mMap->layout()->context(), &QgsLayoutContext::layerChanged, mGridLineStyleButton, &QgsSymbolButton::setLayer );
connect( &mMap->layout()->context(), &QgsLayoutContext::layerChanged, mGridMarkerStyleButton, &QgsSymbolButton::setLayer );
}

}

void QgsLayoutMapGridWidget::populateDataDefinedButtons()
@@ -130,6 +130,14 @@ QgsLayoutMapWidget::QgsLayoutMapWidget( QgsLayoutItemMap *item )
connect( mCrsSelector, &QgsProjectionSelectionWidget::crsChanged, this, &QgsLayoutMapWidget::mapCrsChanged );
connect( mOverviewFrameStyleButton, &QgsSymbolButton::changed, this, &QgsLayoutMapWidget::overviewSymbolChanged );

mOverviewFrameStyleButton->registerExpressionContextGenerator( item );
mOverviewFrameStyleButton->setLayer( coverageLayer() );
if ( item->layout() )
{
connect( &item->layout()->context(), &QgsLayoutContext::layerChanged, mOverviewFrameStyleButton, &QgsSymbolButton::setLayer );
}


registerDataDefinedButton( mScaleDDBtn, QgsLayoutObject::MapScale );
registerDataDefinedButton( mMapRotationDDBtn, QgsLayoutObject::MapRotation );
registerDataDefinedButton( mXMinDDBtn, QgsLayoutObject::MapXMin );

0 comments on commit 8072d4d

Please sign in to comment.
You can’t perform that action at this time.