Skip to content

Commit

Permalink
Fix more potential crashes in renderer widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 7, 2015
1 parent c6df096 commit 2c39a5b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/gui/symbology-ng/qgsheatmaprendererwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ QgsFeatureRendererV2* QgsHeatmapRendererWidget::renderer()
void QgsHeatmapRendererWidget::setMapCanvas( QgsMapCanvas* canvas )
{
QgsRendererV2Widget::setMapCanvas( canvas );
mRadiusUnitWidget->setMapCanvas( canvas );
if ( mRadiusUnitWidget )
mRadiusUnitWidget->setMapCanvas( canvas );
}

void QgsHeatmapRendererWidget::applyColorRamp()
Expand Down
3 changes: 2 additions & 1 deletion src/gui/symbology-ng/qgsinvertedpolygonrendererwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ QgsFeatureRendererV2* QgsInvertedPolygonRendererWidget::renderer()
void QgsInvertedPolygonRendererWidget::setMapCanvas( QgsMapCanvas* canvas )
{
QgsRendererV2Widget::setMapCanvas( canvas );
mEmbeddedRendererWidget->setMapCanvas( canvas );
if ( mEmbeddedRendererWidget )
mEmbeddedRendererWidget->setMapCanvas( canvas );
}

void QgsInvertedPolygonRendererWidget::on_mRendererComboBox_currentIndexChanged( int index )
Expand Down
6 changes: 4 additions & 2 deletions src/gui/symbology-ng/qgspointdisplacementrendererwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,10 @@ QgsFeatureRendererV2* QgsPointDisplacementRendererWidget::renderer()
void QgsPointDisplacementRendererWidget::setMapCanvas( QgsMapCanvas* canvas )
{
QgsRendererV2Widget::setMapCanvas( canvas );
mDistanceUnitWidget->setMapCanvas( canvas );
mEmbeddedRendererWidget->setMapCanvas( canvas );
if ( mDistanceUnitWidget )
mDistanceUnitWidget->setMapCanvas( canvas );
if ( mEmbeddedRendererWidget )
mEmbeddedRendererWidget->setMapCanvas( canvas );
}

void QgsPointDisplacementRendererWidget::on_mLabelFieldComboBox_currentIndexChanged( const QString& text )
Expand Down
3 changes: 2 additions & 1 deletion src/gui/symbology-ng/qgssinglesymbolrendererv2widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ QgsFeatureRendererV2* QgsSingleSymbolRendererV2Widget::renderer()
void QgsSingleSymbolRendererV2Widget::setMapCanvas( QgsMapCanvas* canvas )
{
QgsRendererV2Widget::setMapCanvas( canvas );
mSelector->setMapCanvas( canvas );
if ( mSelector )
mSelector->setMapCanvas( canvas );
}

void QgsSingleSymbolRendererV2Widget::changeSingleSymbol()
Expand Down

0 comments on commit 2c39a5b

Please sign in to comment.