Skip to content
Permalink
Browse files

[vertex editor] connect selection model after setting the model

otherwise, the selection model is a null pointer
  • Loading branch information
3nids committed Jun 7, 2018
1 parent 51ae8e9 commit 83a4fbfb1d0a8354896611962b827764bb2dcf21
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/app/vertextool/qgsvertexeditor.cpp
@@ -293,8 +293,6 @@ QgsVertexEditor::QgsVertexEditor(

setWidget( mTableView );

connect( mTableView->selectionModel(), &QItemSelectionModel::selectionChanged, this, &QgsVertexEditor::updateVertexSelection );

updateEditor( layer, selectedFeature );
}

@@ -311,6 +309,7 @@ void QgsVertexEditor::updateEditor( QgsVectorLayer *layer, QgsSelectedFeature *s
// TODO We really should just update the model itself.
mVertexModel = new QgsVertexEditorModel( mLayer, mSelectedFeature, mCanvas, this );
mTableView->setModel( mVertexModel );
connect( mTableView->selectionModel(), &QItemSelectionModel::selectionChanged, this, &QgsVertexEditor::updateVertexSelection );

connect( mSelectedFeature, &QgsSelectedFeature::selectionChanged, this, &QgsVertexEditor::updateTableSelection );
}

0 comments on commit 83a4fbf

Please sign in to comment.
You can’t perform that action at this time.