Skip to content
Permalink
Browse files

Minor fixes for select referenced feature map tool

 * Message on the message bar correctly formatted
 * Esc button to deactivate also works without first clicking on the canvas
  • Loading branch information
m-kuhn committed Mar 16, 2015
1 parent c9ff77f commit 8561b45b1d96afdd38365dabd35656b1bc4028a8
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/gui/editorwidgets/qgsrelationreferencewidget.cpp
@@ -586,14 +586,15 @@ void QgsRelationReferenceWidget::mapIdentification()

mCanvas->window()->raise();
mCanvas->activateWindow();
mCanvas->setFocus();

connect( mMapTool, SIGNAL( featureIdentified( QgsFeature ) ), this, SLOT( featureIdentified( const QgsFeature ) ) );
connect( mMapTool, SIGNAL( deactivated() ), this, SLOT( mapToolDeactivated() ) );

if ( mMessageBar )
{
QString title = QString( "Relation %1 for %2." ).arg( mRelationName ).arg( mReferencingLayer->name() );
QString msg = tr( "Identify a feature of %1 to be associated. Press <ESC> to cancel." ).arg( mReferencedLayer->name() );
QString msg = tr( "Identify a feature of %1 to be associated. Press &lt;ESC&gt; to cancel." ).arg( mReferencedLayer->name() );
mMessageBarItem = QgsMessageBar::createMessage( title, msg, this );
mMessageBar->pushItem( mMessageBarItem );
}

0 comments on commit 8561b45

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