Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
address @wonder-wonder-sk 's comments on node editor improvements
  • Loading branch information
nirvn committed Jan 23, 2019
1 parent c84e6ed commit b5cb74f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/app/vertextool/qgsvertexeditor.cpp
Expand Up @@ -337,6 +337,7 @@ void QgsVertexEditor::updateEditor( QgsVectorLayer *layer, QgsSelectedFeature *s
if ( mSelectedFeature )
{
delete mVertexModel;
mVertexModel = nullptr;
}

mLayer = layer;
Expand Down
5 changes: 3 additions & 2 deletions src/app/vertextool/qgsvertextool.cpp
Expand Up @@ -1068,7 +1068,7 @@ void QgsVertexTool::onCachedGeometryDeleted( QgsFeatureId fid )
void QgsVertexTool::showVertexEditor() //#spellok
{
QgsPointLocator::Match m = mLastMouseMoveMatch;
if ( m.isValid() || m.layer() )
if ( m.isValid() && m.layer() )
{
if ( mSelectedFeature && mSelectedFeature->featureId() == m.featureId() && mSelectedFeature->layer() == m.layer() )
{
Expand Down Expand Up @@ -1099,7 +1099,8 @@ void QgsVertexTool::showVertexEditor() //#spellok
connect( mVertexEditor.get(), &QgsVertexEditor::deleteSelectedRequested, this, &QgsVertexTool::deleteVertexEditorSelection );
connect( mVertexEditor.get(), &QgsVertexEditor::editorClosed, this, &QgsVertexTool::cleanupVertexEditor );

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

0 comments on commit b5cb74f

Please sign in to comment.