Skip to content

Commit b5cb74f

Browse files
committedJan 23, 2019
address @wonder-wonder-sk 's comments on node editor improvements
1 parent c84e6ed commit b5cb74f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
 

‎src/app/vertextool/qgsvertexeditor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ void QgsVertexEditor::updateEditor( QgsVectorLayer *layer, QgsSelectedFeature *s
337337
if ( mSelectedFeature )
338338
{
339339
delete mVertexModel;
340+
mVertexModel = nullptr;
340341
}
341342

342343
mLayer = layer;

‎src/app/vertextool/qgsvertextool.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@ void QgsVertexTool::onCachedGeometryDeleted( QgsFeatureId fid )
10681068
void QgsVertexTool::showVertexEditor() //#spellok
10691069
{
10701070
QgsPointLocator::Match m = mLastMouseMoveMatch;
1071-
if ( m.isValid() || m.layer() )
1071+
if ( m.isValid() && m.layer() )
10721072
{
10731073
if ( mSelectedFeature && mSelectedFeature->featureId() == m.featureId() && mSelectedFeature->layer() == m.layer() )
10741074
{
@@ -1099,7 +1099,8 @@ void QgsVertexTool::showVertexEditor() //#spellok
10991099
connect( mVertexEditor.get(), &QgsVertexEditor::deleteSelectedRequested, this, &QgsVertexTool::deleteVertexEditorSelection );
11001100
connect( mVertexEditor.get(), &QgsVertexEditor::editorClosed, this, &QgsVertexTool::cleanupVertexEditor );
11011101

1102-
QTimer::singleShot( 100, this, [ = ] { mVertexEditor->show(); mVertexEditor->raise(); } );
1102+
// timer required as showing/raising the vertex editor in the same function following restoreDockWidget fails
1103+
QTimer::singleShot( 200, this, [ = ] { mVertexEditor->show(); mVertexEditor->raise(); } );
11031104
}
11041105
else
11051106
{

0 commit comments

Comments
 (0)
Please sign in to comment.