Skip to content
Permalink
Browse files

Avoid some unnecessary composer legend updates

  • Loading branch information
nyalldawson committed Jul 12, 2016
1 parent 63f9f71 commit aaa654fba9a79b8842ada7570e653dc8b4f39a97
Showing with 5 additions and 0 deletions.
  1. +3 −0 src/app/composer/qgscomposerlegendwidget.cpp
  2. +2 −0 src/core/composer/qgscomposerlegend.cpp
@@ -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 )
@@ -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();
}

0 comments on commit aaa654f

Please sign in to comment.
You can’t perform that action at this time.