Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Restore some more atlas style related UI
  • Loading branch information
nyalldawson committed Jan 5, 2018
1 parent 6506bcd commit 8072d4d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/app/layout/qgslayoutmapgridwidget.cpp
Expand Up @@ -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()
Expand Down
8 changes: 8 additions & 0 deletions src/app/layout/qgslayoutmapwidget.cpp
Expand Up @@ -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 );
Expand Down

0 comments on commit 8072d4d

Please sign in to comment.