void QgsComposerLegend::setAutoUpdateModel( bool autoUpdate ) { if ( autoUpdate == autoUpdateModel() ) return; setCustomLayerTree( autoUpdate ? 0 : QgsLayerTree::toGroup( QgsProject::instance()->layerTreeRoot()->clone() ) ); }
void QgsComposerLegend::nodeCustomPropertyChanged( QgsLayerTreeNode *, const QString & ) { if ( autoUpdateModel() ) { // in "auto update" mode, some parameters on the main app legend may have been changed (expression filtering) // we must then call updateItem to reflect the changes updateItem(); } }
void QgsComposerLegend::setAutoUpdateModel( bool autoUpdate ) { if ( autoUpdate == autoUpdateModel() ) return; setCustomLayerTree( autoUpdate ? nullptr : mComposition->project()->layerTreeRoot()->clone() ); adjustBoxSize(); updateItem(); }
void QgsLayoutItemLegend::setAutoUpdateModel( bool autoUpdate ) { if ( autoUpdate == autoUpdateModel() ) return; setCustomLayerTree( autoUpdate ? nullptr : mLayout->project()->layerTreeRoot()->clone() ); adjustBoxSize(); updateFilterByMap( false ); }