Skip to content

Commit

Permalink
Restore some more atlas handling
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 5, 2018
1 parent a5ab4e1 commit 6506bcd
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
7 changes: 7 additions & 0 deletions src/app/layout/qgslayoutpagepropertieswidget.cpp
Expand Up @@ -76,6 +76,13 @@ QgsLayoutPagePropertiesWidget::QgsLayoutPagePropertiesWidget( QWidget *parent, Q

mExcludePageDDBtn->registerEnabledWidget( mExcludePageCheckBox, false );

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

showCurrentPageSize();
}

Expand Down
10 changes: 7 additions & 3 deletions src/app/layout/qgslayoutpolygonwidget.cpp
Expand Up @@ -46,9 +46,13 @@ QgsLayoutPolygonWidget::QgsLayoutPolygonWidget( QgsLayoutItemPolygon *polygon )
}

setGuiElementValues();
#if 0 //TODO
mShapeStyleButton->setLayer( atlasCoverageLayer() );
#endif

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

bool QgsLayoutPolygonWidget::setNewItem( QgsLayoutItem *item )
Expand Down
9 changes: 6 additions & 3 deletions src/app/layout/qgslayoutpolylinewidget.cpp
Expand Up @@ -88,9 +88,12 @@ QgsLayoutPolylineWidget::QgsLayoutPolylineWidget( QgsLayoutItemPolyline *polylin
}
setGuiElementValues();

#if 0 //TODO
mShapeStyleButton->setLayer( atlasCoverageLayer() );
#endif
mLineStyleButton->registerExpressionContextGenerator( mPolyline );
mLineStyleButton->setLayer( coverageLayer() );
if ( mPolyline->layout() )
{
connect( &mPolyline->layout()->context(), &QgsLayoutContext::layerChanged, mLineStyleButton, &QgsSymbolButton::setLayer );
}
}

bool QgsLayoutPolylineWidget::setNewItem( QgsLayoutItem *item )
Expand Down

0 comments on commit 6506bcd

Please sign in to comment.