Skip to content

Commit

Permalink
[node editor] Use a timer to properly raise panel, improve hint label
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Jan 23, 2019
1 parent 0255a67 commit a34a4f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/app/vertextool/qgsvertexeditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,8 @@ QgsVertexEditor::QgsVertexEditor(
layout->setContentsMargins( 0, 0, 0, 0 );

mHintLabel = new QLabel( this );
mHintLabel->setText( tr( "Right click on the edge of an editable feature to show its table of vertices" ) );
mHintLabel->setText( QStringLiteral( "%1\n\n%2" ).arg( tr( "Right click on the edge of an editable feature to show its table of vertices." ),
tr( "When a feature is bound to this panel, dragging a rectangle to select vertices on the canvas will only select those of the bound feature." ) ) );
mHintLabel->setWordWrap( true );
mHintLabel->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter );

Expand Down
5 changes: 2 additions & 3 deletions src/app/vertextool/qgsvertextool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

#include <QMenu>
#include <QRubberBand>

#include <QTimer>

uint qHash( const Vertex &v )
{
Expand Down Expand Up @@ -1096,8 +1096,7 @@ void QgsVertexTool::showVertexEditor() //#spellok
connect( mVertexEditor.get(), &QgsVertexEditor::deleteSelectedRequested, this, &QgsVertexTool::deleteVertexEditorSelection );
connect( mVertexEditor.get(), &QgsVertexEditor::editorClosed, this, &QgsVertexTool::cleanupVertexEditor );

mVertexEditor->show();
mVertexEditor->raise();
QTimer::singleShot( 100, this, [ = ] { mVertexEditor->show(); mVertexEditor->raise(); } );
}
else
{
Expand Down

0 comments on commit a34a4f3

Please sign in to comment.