Skip to content

Commit

Permalink
Fix some missing auto updates from style dock
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 8, 2016
1 parent 35a08fa commit fea82ae
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/symbology-ng/qgspointdisplacementrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ QgsPointDisplacementRenderer::~QgsPointDisplacementRenderer()
QgsPointDisplacementRenderer* QgsPointDisplacementRenderer::clone() const
{
QgsPointDisplacementRenderer* r = new QgsPointDisplacementRenderer( mLabelAttributeName );
r->setEmbeddedRenderer( mRenderer->clone() );
if ( mRenderer )
r->setEmbeddedRenderer( mRenderer->clone() );
r->setCircleWidth( mCircleWidth );
r->setCircleColor( mCircleColor );
r->setLabelFont( mLabelFont );
Expand Down
1 change: 1 addition & 0 deletions src/gui/symbology-ng/qgsinvertedpolygonrendererwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,5 @@ void QgsInvertedPolygonRendererWidget::on_mRendererComboBox_currentIndexChanged(
void QgsInvertedPolygonRendererWidget::on_mMergePolygonsCheckBox_stateChanged( int state )
{
mRenderer->setPreprocessingEnabled( state == Qt::Checked );
emit widgetChanged();
}
13 changes: 13 additions & 0 deletions src/gui/symbology-ng/qgspointdisplacementrendererwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ void QgsPointDisplacementRendererWidget::on_mLabelFieldComboBox_currentIndexChan
{
mRenderer->setLabelAttributeName( text );
}
emit widgetChanged();
}
}

Expand All @@ -201,6 +202,7 @@ void QgsPointDisplacementRendererWidget::on_mRendererComboBox_currentIndexChange
delete mEmbeddedRendererWidget;
mEmbeddedRendererWidget = m->createRendererWidget( mLayer, mStyle, mRenderer->embeddedRenderer()->clone() );
mEmbeddedRendererWidget->setMapCanvas( mMapCanvas );
emit widgetChanged();
}
}

Expand All @@ -210,6 +212,7 @@ void QgsPointDisplacementRendererWidget::on_mPlacementComboBox_currentIndexChang
return;

mRenderer->setPlacement(( QgsPointDisplacementRenderer::Placement )mPlacementComboBox->itemData( index ).toInt() );
emit widgetChanged();
}

void QgsPointDisplacementRendererWidget::on_mRendererSettingsButton_clicked()
Expand All @@ -233,6 +236,7 @@ void QgsPointDisplacementRendererWidget::on_mRendererSettingsButton_clicked()
d->exec();
mEmbeddedRendererWidget->setParent( nullptr );
delete d;
emit widgetChanged();
}
}

Expand All @@ -248,6 +252,7 @@ void QgsPointDisplacementRendererWidget::on_mLabelFontButton_clicked()
if ( ok )
{
mRenderer->setLabelFont( newFont );
emit widgetChanged();
}
}

Expand All @@ -256,6 +261,7 @@ void QgsPointDisplacementRendererWidget::on_mCircleWidthSpinBox_valueChanged( do
if ( mRenderer )
{
mRenderer->setCircleWidth( d );
emit widgetChanged();
}
}

Expand All @@ -267,6 +273,7 @@ void QgsPointDisplacementRendererWidget::on_mCircleColorButton_colorChanged( con
}

mRenderer->setCircleColor( newColor );
emit widgetChanged();
}

void QgsPointDisplacementRendererWidget::on_mLabelColorButton_colorChanged( const QColor& newColor )
Expand All @@ -277,6 +284,7 @@ void QgsPointDisplacementRendererWidget::on_mLabelColorButton_colorChanged( cons
}

mRenderer->setLabelColor( newColor );
emit widgetChanged();
}

void QgsPointDisplacementRendererWidget::on_mCircleModificationSpinBox_valueChanged( double d )
Expand All @@ -287,13 +295,15 @@ void QgsPointDisplacementRendererWidget::on_mCircleModificationSpinBox_valueChan
}

mRenderer->setCircleRadiusAddition( d );
emit widgetChanged();
}

void QgsPointDisplacementRendererWidget::on_mDistanceSpinBox_valueChanged( double d )
{
if ( mRenderer )
{
mRenderer->setTolerance( d );
emit widgetChanged();
}
}

Expand All @@ -303,6 +313,7 @@ void QgsPointDisplacementRendererWidget::on_mDistanceUnitWidget_changed()
{
mRenderer->setToleranceUnit( mDistanceUnitWidget->unit() );
mRenderer->setToleranceMapUnitScale( mDistanceUnitWidget->getMapUnitScale() );
emit widgetChanged();
}
}

Expand Down Expand Up @@ -331,6 +342,7 @@ void QgsPointDisplacementRendererWidget::on_mMaxScaleDenominatorEdit_textChanged
if ( ok )
{
mRenderer->setMaxLabelScaleDenominator( scaleDenominator );
emit widgetChanged();
}
}

Expand Down Expand Up @@ -367,6 +379,7 @@ void QgsPointDisplacementRendererWidget::on_mCenterSymbolPushButton_clicked()
}
mRenderer->setCenterSymbol( markerSymbol );
updateCenterIcon();
emit widgetChanged();
}

void QgsPointDisplacementRendererWidget::updateCenterIcon()
Expand Down

0 comments on commit fea82ae

Please sign in to comment.