Skip to content

Commit b602b3d

Browse files
committedJan 5, 2018
Working label updates on atlas feature change
1 parent 5d1d25b commit b602b3d

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed
 

‎src/app/layout/qgslayoutdesignerdialog.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1943,6 +1943,7 @@ void QgsLayoutDesignerDialog::atlasPreviewTriggered( bool checked )
19431943
else
19441944
{
19451945
QgisApp::instance()->mapCanvas()->stopRendering();
1946+
atlas->first();
19461947
#if 0 //TODO
19471948
emit atlasPreviewFeatureChanged();
19481949
#endif
@@ -2220,6 +2221,7 @@ void QgsLayoutDesignerDialog::createAtlasWidget()
22202221
mStatusBar->showMessage( message );
22212222
} );
22222223
connect( atlas, &QgsLayoutAtlas::toggled, this, &QgsLayoutDesignerDialog::toggleAtlasControls );
2224+
connect( atlas, &QgsLayoutAtlas::toggled, this, &QgsLayoutDesignerDialog::refreshLayout );
22232225
connect( atlas, &QgsLayoutAtlas::numberFeaturesChanged, this, &QgsLayoutDesignerDialog::updateAtlasPageComboBox );
22242226
connect( atlas, &QgsLayoutAtlas::featureChanged, this, &QgsLayoutDesignerDialog::atlasFeatureChanged );
22252227
toggleAtlasControls( atlas->enabled() && atlas->coverageLayer() );

‎src/core/layout/qgslayoutitemlabel.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,7 @@ void QgsLayoutItemLabel::setFrameStrokeWidth( const QgsLayoutMeasurement &stroke
492492

493493
void QgsLayoutItemLabel::refresh()
494494
{
495+
QgsLayoutItem::refresh();
495496
contentChanged();
496497
}
497498

‎src/core/layout/qgslayoutobject.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <QPainter>
1919

2020
#include "qgslayout.h"
21+
#include "qgslayoutcontext.h"
2122
#include "qgslayoutobject.h"
2223

2324

@@ -92,6 +93,7 @@ QgsLayoutObject::QgsLayoutObject( QgsLayout *layout )
9293
if ( mLayout )
9394
{
9495
connect( mLayout, &QgsLayout::refreshed, this, &QgsLayoutObject::refresh );
96+
connect( &mLayout->context(), &QgsLayoutContext::changed, this, &QgsLayoutObject::refresh );
9597
}
9698
}
9799

0 commit comments

Comments
 (0)
Please sign in to comment.