Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Working label updates on atlas feature change
  • Loading branch information
nyalldawson committed Jan 5, 2018
1 parent 5d1d25b commit b602b3d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/layout/qgslayoutdesignerdialog.cpp
Expand Up @@ -1943,6 +1943,7 @@ void QgsLayoutDesignerDialog::atlasPreviewTriggered( bool checked )
else
{
QgisApp::instance()->mapCanvas()->stopRendering();
atlas->first();
#if 0 //TODO
emit atlasPreviewFeatureChanged();
#endif
Expand Down Expand Up @@ -2220,6 +2221,7 @@ void QgsLayoutDesignerDialog::createAtlasWidget()
mStatusBar->showMessage( message );
} );
connect( atlas, &QgsLayoutAtlas::toggled, this, &QgsLayoutDesignerDialog::toggleAtlasControls );
connect( atlas, &QgsLayoutAtlas::toggled, this, &QgsLayoutDesignerDialog::refreshLayout );
connect( atlas, &QgsLayoutAtlas::numberFeaturesChanged, this, &QgsLayoutDesignerDialog::updateAtlasPageComboBox );
connect( atlas, &QgsLayoutAtlas::featureChanged, this, &QgsLayoutDesignerDialog::atlasFeatureChanged );
toggleAtlasControls( atlas->enabled() && atlas->coverageLayer() );
Expand Down
1 change: 1 addition & 0 deletions src/core/layout/qgslayoutitemlabel.cpp
Expand Up @@ -492,6 +492,7 @@ void QgsLayoutItemLabel::setFrameStrokeWidth( const QgsLayoutMeasurement &stroke

void QgsLayoutItemLabel::refresh()
{
QgsLayoutItem::refresh();
contentChanged();
}

Expand Down
2 changes: 2 additions & 0 deletions src/core/layout/qgslayoutobject.cpp
Expand Up @@ -18,6 +18,7 @@
#include <QPainter>

#include "qgslayout.h"
#include "qgslayoutcontext.h"
#include "qgslayoutobject.h"


Expand Down Expand Up @@ -92,6 +93,7 @@ QgsLayoutObject::QgsLayoutObject( QgsLayout *layout )
if ( mLayout )
{
connect( mLayout, &QgsLayout::refreshed, this, &QgsLayoutObject::refresh );
connect( &mLayout->context(), &QgsLayoutContext::changed, this, &QgsLayoutObject::refresh );
}
}

Expand Down

0 comments on commit b602b3d

Please sign in to comment.