Skip to content
Permalink
Browse files

[node editor] Use a timer to properly raise panel, improve hint label

  • Loading branch information
nirvn committed Jan 23, 2019
1 parent 0255a67 commit a34a4f37b1b49307072e3f5ca6501df007726061
Showing with 4 additions and 4 deletions.
  1. +2 −1 src/app/vertextool/qgsvertexeditor.cpp
  2. +2 −3 src/app/vertextool/qgsvertextool.cpp
@@ -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 );

@@ -41,7 +41,7 @@

#include <QMenu>
#include <QRubberBand>

#include <QTimer>

uint qHash( const Vertex &v )
{
@@ -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
{

0 comments on commit a34a4f3

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