Skip to content

Commit

Permalink
Avoid some unnecessary composer legend updates
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jul 12, 2016
1 parent 63f9f71 commit aaa654f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/composer/qgscomposerlegendwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,9 @@ void QgsComposerLegendWidget::blockAllSignals( bool b )
mRasterBorderGroupBox->blockSignals( b );
mRasterBorderColorButton->blockSignals( b );
mRasterBorderWidthSpinBox->blockSignals( b );
mWmsLegendWidthSpinBox->blockSignals( b );
mWmsLegendHeightSpinBox->blockSignals( b );
mTitleSpaceBottomSpinBox->blockSignals( b );
}

void QgsComposerLegendWidget::selectedChanged( const QModelIndex & current, const QModelIndex & previous )
Expand Down
2 changes: 2 additions & 0 deletions src/core/composer/qgscomposerlegend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,9 @@ void QgsComposerLegend::synchronizeWithModel()
void QgsComposerLegend::updateLegend()
{
// take layer list from map renderer (to have legend order)
mLegendModel.blockSignals( true );
mLegendModel.setLayerSet( mComposition ? mComposition->mapSettings().layers() : QStringList() );
mLegendModel.blockSignals( false );
adjustBoxSize();
updateItem();
}
Expand Down

0 comments on commit aaa654f

Please sign in to comment.