Skip to content

Commit

Permalink
Working label updates on atlas feature change
Browse files Browse the repository at this point in the history
  • 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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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.