Skip to content

Commit

Permalink
[node editor] fix crash when editor is open and feature deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn authored and wonder-sk committed Nov 23, 2017
1 parent 248bc5d commit 134065d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/app/nodetool/qgsnodetool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,7 @@ void QgsNodeTool::showNodeEditor()
mNodeEditor.reset( new QgsNodeEditor( m.layer(), mSelectedFeature.get(), mCanvas ) );
QgisApp::instance()->addDockWidget( Qt::LeftDockWidgetArea, mNodeEditor.get() );
connect( mNodeEditor.get(), &QgsNodeEditor::deleteSelectedRequested, this, &QgsNodeTool::deleteNodeEditorSelection );
connect( mSelectedFeature.get()->vlayer(), &QgsVectorLayer::featureDeleted, this, [ = ]( QgsFeatureId id ) { if ( mSelectedFeature.get()->featureId() == id ) cleanupNodeEditor(); } );
}

void QgsNodeTool::cleanupNodeEditor()
Expand Down

0 comments on commit 134065d

Please sign in to comment.