Skip to content

Commit d277fb8

Browse files
authored
Merge pull request #8266 from elpaso/bugfix-20180-doublespinbox-crash
Do not delete the clear action (and don't crash)
2 parents 5e6eef3 + 7f10a3a commit d277fb8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/app/qgssnappingwidget.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,10 @@ QgsSnappingWidget::QgsSnappingWidget( QgsProject *project, QgsMapCanvas *canvas,
201201
mTracingOffsetSpinBox->setRange( -1000000, 1000000 );
202202
mTracingOffsetSpinBox->setDecimals( 6 );
203203
mTracingOffsetSpinBox->setClearValue( 0 );
204-
mTracingOffsetSpinBox->setClearValueMode( QgsDoubleSpinBox::CustomValue );
204+
mTracingOffsetSpinBox->setClearValueMode( QgsDoubleSpinBox::ClearValueMode::CustomValue );
205+
// Note: set to false to "fix" a crash
206+
// See https://github.com/qgis/QGIS/pull/8266 for some more context
207+
mTracingOffsetSpinBox->setShowClearButton( false );
205208
QMenu *tracingMenu = new QMenu( this );
206209
QWidgetAction *widgetAction = new QWidgetAction( tracingMenu );
207210
QVBoxLayout *tracingWidgetLayout = new QVBoxLayout;

0 commit comments

Comments
 (0)