Skip to content
Permalink
Browse files
Fix crash when settings-options is accepted when 3d view is open
  • Loading branch information
nyalldawson committed Jan 10, 2022
1 parent 3bc1338 commit a219d28ae609aeda445297fb8b0c3d807501fff7
Showing with 9 additions and 6 deletions.
  1. +9 −6 src/app/3d/qgs3dmaptoolmeasureline.cpp
@@ -169,13 +169,16 @@ void Qgs3DMapToolMeasureLine::handleClick( Qt3DRender::QPickEvent *event, const

void Qgs3DMapToolMeasureLine::updateSettings()
{
const QgsSettings settings;
const int myRed = settings.value( QStringLiteral( "qgis/default_measure_color_red" ), 222 ).toInt();
const int myGreen = settings.value( QStringLiteral( "qgis/default_measure_color_green" ), 155 ).toInt();
const int myBlue = settings.value( QStringLiteral( "qgis/default_measure_color_blue" ), 67 ).toInt();
if ( mRubberBand )
{
const QgsSettings settings;
const int myRed = settings.value( QStringLiteral( "qgis/default_measure_color_red" ), 222 ).toInt();
const int myGreen = settings.value( QStringLiteral( "qgis/default_measure_color_green" ), 155 ).toInt();
const int myBlue = settings.value( QStringLiteral( "qgis/default_measure_color_blue" ), 67 ).toInt();

mRubberBand->setWidth( 3 );
mRubberBand->setColor( QColor( myRed, myGreen, myBlue ) );
mRubberBand->setWidth( 3 );
mRubberBand->setColor( QColor( myRed, myGreen, myBlue ) );
}
}

void Qgs3DMapToolMeasureLine::addPoint( const QgsPoint &point )

0 comments on commit a219d28

Please sign in to comment.