Skip to content

Commit

Permalink
[node editor] Restore node editor panel postion/docked state
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Jan 23, 2019
1 parent 642ff63 commit 2cfbb28
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/app/vertextool/qgsvertextool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1078,13 +1078,21 @@ void QgsVertexTool::showVertexEditor() //#spellok
if ( !mVertexEditor )
{
mVertexEditor.reset( new QgsVertexEditor( m.layer() ? m.layer() : currentVectorLayer(), mSelectedFeature ? mSelectedFeature.get() : nullptr, mCanvas ) );
QgisApp::instance()->addDockWidget( Qt::LeftDockWidgetArea, mVertexEditor.get() );
if ( !QgisApp::instance()->restoreDockWidget( mVertexEditor.get() ) )
QgisApp::instance()->addDockWidget( Qt::LeftDockWidgetArea, mVertexEditor.get() );

connect( mVertexEditor.get(), &QgsVertexEditor::deleteSelectedRequested, this, &QgsVertexTool::deleteVertexEditorSelection );
connect( mVertexEditor.get(), &QgsVertexEditor::editorClosed, this, &QgsVertexTool::cleanupVertexEditor );

mVertexEditor->show();
mVertexEditor->raise();
}
else
{
mVertexEditor->updateEditor( m.layer(), mSelectedFeature.get() );

mVertexEditor->show();
mVertexEditor->raise();
}

if ( mSelectedFeature )
Expand Down

0 comments on commit 2cfbb28

Please sign in to comment.