Skip to content
Permalink
Browse files

Fix rule based settings not saved (fix #15146, #15147, #15148)

  • Loading branch information
nyalldawson committed Jun 27, 2016
1 parent 0634377 commit c49af32e95d21d766f4915be261564635250ae05
@@ -37,4 +37,13 @@ class QgsScaleRangeWidget : QWidget
void setMaximumScale( double scale );

void setScaleRange( double min, double max );

signals:

/** Emitted when the scale range set in the widget is changed.
* @param min minimum scale
* @param max maximum scale
* @note added in QGIS 2.16
*/
void rangeChanged( double min, double max );
};
@@ -64,6 +64,9 @@ QgsScaleRangeWidget::QgsScaleRangeWidget( QWidget *parent )
mLayout->setColumnStretch( 3, 0 );
mLayout->setColumnStretch( 4, 0 );
mLayout->setColumnStretch( 5, 3 );

connect( mMinimumScaleWidget, SIGNAL( scaleChanged( double ) ), this, SLOT( emitRangeChanged() ) );
connect( mMaximumScaleWidget, SIGNAL( scaleChanged( double ) ), this, SLOT( emitRangeChanged() ) );
}

QgsScaleRangeWidget::~QgsScaleRangeWidget()
@@ -123,3 +126,8 @@ void QgsScaleRangeWidget::setScaleRange( double min, double max )
setMinimumScale( min );
}

void QgsScaleRangeWidget::emitRangeChanged()
{
emit rangeChanged( minimumScale(), maximumScale() );
}

@@ -62,6 +62,19 @@ class GUI_EXPORT QgsScaleRangeWidget : public QWidget

void setScaleRange( double min, double max );

signals:

/** Emitted when the scale range set in the widget is changed.
* @param min minimum scale
* @param max maximum scale
* @note added in QGIS 2.16
*/
void rangeChanged( double min, double max );

private slots:

void emitRangeChanged();

private:
//! pointer to the map canvas used for current buttons.
QgsMapCanvas* mCanvas;
@@ -656,7 +656,11 @@ QgsRendererRulePropsWidget::QgsRendererRulePropsWidget( QgsRuleBasedRendererV2::
connect( btnExpressionBuilder, SIGNAL( clicked() ), this, SLOT( buildExpression() ) );
connect( btnTestFilter, SIGNAL( clicked() ), this, SLOT( testFilter() ) );
connect( editFilter, SIGNAL( textChanged( QString ) ), this, SIGNAL( widgetChanged() ) );

connect( editLabel, SIGNAL( textChanged( QString ) ), this, SIGNAL( widgetChanged() ) );
connect( editDescription, SIGNAL( textChanged( QString ) ), this, SIGNAL( widgetChanged() ) );
connect( groupSymbol, SIGNAL( toggled( bool ) ), this, SIGNAL( widgetChanged() ) );
connect( groupScale, SIGNAL( toggled( bool ) ), this, SIGNAL( widgetChanged() ) );
connect( mScaleRangeWidget, SIGNAL( rangeChanged( double, double ) ), this, SIGNAL( widgetChanged() ) );
}

QgsRendererRulePropsWidget::~QgsRendererRulePropsWidget()

0 comments on commit c49af32

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