Skip to content

Commit

Permalink
Fix crash when adding child features from forms
Browse files Browse the repository at this point in the history
Fixes #34552

probably fixes other unreported issues.
  • Loading branch information
elpaso committed Feb 19, 2020
1 parent ced0ed4 commit 1bb6a53
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/app/qgisappinterface.cpp
Expand Up @@ -759,6 +759,7 @@ QgsAttributeDialog *QgisAppInterface::getFeatureForm( QgsVectorLayer *l, QgsFeat
context.setDistanceArea( myDa );
context.setVectorLayerTools( qgis->vectorLayerTools() );
context.setMapCanvas( qgis->mapCanvas() );
context.setCadDockWidget( qgis->cadDockWidget() );
QgsAttributeDialog *dialog = new QgsAttributeDialog( l, &feature, false, qgis, true, context );
if ( !feature.isValid() )
{
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsfeatureaction.cpp
Expand Up @@ -63,6 +63,7 @@ QgsAttributeDialog *QgsFeatureAction::newDialog( bool cloneFeature )
context.setDistanceArea( myDa );
context.setVectorLayerTools( QgisApp::instance()->vectorLayerTools() );
context.setMapCanvas( QgisApp::instance()->mapCanvas() );
context.setCadDockWidget( QgisApp::instance()->cadDockWidget() );
context.setFormMode( QgsAttributeEditorContext::StandaloneDialog );

QgsAttributeDialog *dialog = new QgsAttributeDialog( mLayer, f, cloneFeature, parentWidget(), true, context );
Expand Down
1 change: 1 addition & 0 deletions src/gui/qgsmaptooladvanceddigitizing.cpp
Expand Up @@ -25,6 +25,7 @@ QgsMapToolAdvancedDigitizing::QgsMapToolAdvancedDigitizing( QgsMapCanvas *canvas
: QgsMapToolEdit( canvas )
, mCadDockWidget( cadDockWidget )
{
Q_ASSERT( cadDockWidget );
connect( canvas, &QgsMapCanvas::currentLayerChanged, this, &QgsMapToolAdvancedDigitizing::onCurrentLayerChanged );
}

Expand Down

0 comments on commit 1bb6a53

Please sign in to comment.