Skip to content
Permalink
Browse files

address @wonder-wonder-sk 's comments on node editor improvements

  • Loading branch information
nirvn committed Jan 23, 2019
1 parent 1bf792c commit 63ee9a34f052de5e6f9b5a9da2453660a4db1a01
Showing with 4 additions and 2 deletions.
  1. +1 −0 src/app/vertextool/qgsvertexeditor.cpp
  2. +3 −2 src/app/vertextool/qgsvertextool.cpp
@@ -337,6 +337,7 @@ void QgsVertexEditor::updateEditor( QgsVectorLayer *layer, QgsSelectedFeature *s
if ( mSelectedFeature )
{
delete mVertexModel;
mVertexModel = nullptr;
}

mLayer = layer;
@@ -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() )
{
@@ -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
{

0 comments on commit 63ee9a3

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