Skip to content

Commit

Permalink
Minor fixes for select referenced feature map tool
Browse files Browse the repository at this point in the history
 * 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 8561b45
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/editorwidgets/qgsrelationreferencewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
Expand Down

0 comments on commit 8561b45

Please sign in to comment.