@@ -57,6 +57,9 @@ QgsMapStylingWidget::QgsMapStylingWidget( QgsMapCanvas* canvas, QList<QgsMapStyl
5757
5858 connect ( QgsMapLayerRegistry::instance (), SIGNAL ( layerWillBeRemoved ( QgsMapLayer* ) ), this , SLOT ( layerAboutToBeRemoved ( QgsMapLayer* ) ) );
5959
60+ QSettings settings;
61+ mLiveApplyCheck ->setChecked ( settings.value ( " UI/autoApplyStyling" , true ).toBool () );
62+
6063 mAutoApplyTimer = new QTimer ( this );
6164 mAutoApplyTimer ->setSingleShot ( true );
6265
@@ -74,6 +77,7 @@ QgsMapStylingWidget::QgsMapStylingWidget( QgsMapCanvas* canvas, QList<QgsMapStyl
7477 connect ( mOptionsListWidget , SIGNAL ( currentRowChanged ( int ) ), this , SLOT ( updateCurrentWidgetLayer () ) );
7578 connect ( mButtonBox ->button ( QDialogButtonBox::Apply ), SIGNAL ( clicked () ), this , SLOT ( apply () ) );
7679 connect ( mLayerCombo , SIGNAL ( layerChanged ( QgsMapLayer* ) ), this , SLOT ( setLayer ( QgsMapLayer* ) ) );
80+ connect ( mLiveApplyCheck , SIGNAL ( toggled ( bool ) ), this , SLOT ( liveApplyToggled ( bool ) ) );
7781
7882 mStackedWidget ->setCurrentIndex ( 0 );
7983}
@@ -366,6 +370,12 @@ void QgsMapStylingWidget::layerAboutToBeRemoved( QgsMapLayer* layer )
366370 }
367371}
368372
373+ void QgsMapStylingWidget::liveApplyToggled ( bool value )
374+ {
375+ QSettings settings;
376+ settings.setValue ( " UI/autoApplyStyling" , value );
377+ }
378+
369379void QgsMapStylingWidget::pushUndoItem ( const QString &name )
370380{
371381 QString errorMsg;
0 commit comments