mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-18 00:03:05 -04:00
address @wonder-wonder-sk 's comments on node editor improvements
This commit is contained in:
parent
1bf792cc4b
commit
63ee9a34f0
@ -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
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user