Skip to content

Commit f8228a2

Browse files
committedSep 17, 2014
do not raise canvas but window (fix hiding message bar)
1 parent 9ebb69e commit f8228a2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/gui/editorwidgets/qgsrelationreferencewidget.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ QgsRelationReferenceWidget::QgsRelationReferenceWidget( QWidget* parent )
137137
QgsRelationReferenceWidget::~QgsRelationReferenceWidget()
138138
{
139139
deleteHighlight();
140+
unsetMapTool();
140141
delete mMapTool;
141142
}
142143

@@ -517,9 +518,8 @@ void QgsRelationReferenceWidget::mapIdentification()
517518
mCanvas->setMapTool( mMapTool );
518519

519520
mWindowWidget = window();
520-
connect( mWindowWidget, SIGNAL( destroyed() ), this, SLOT( unsetMapTool() ) );
521521

522-
mCanvas->raise();
522+
mCanvas->window()->raise();
523523
mCanvas->activateWindow();
524524

525525
connect( mMapTool, SIGNAL( featureIdentified( QgsFeature ) ), this, SLOT( featureIdentified( const QgsFeature ) ) );
@@ -529,7 +529,7 @@ void QgsRelationReferenceWidget::mapIdentification()
529529
{
530530
QString title = QString( "Relation %1 for %2." ).arg( mRelationName ).arg( mReferencingLayer->name() );
531531
QString msg = tr( "Identify a feature of %1 to be associated. Press <ESC> to cancel." ).arg( mReferencedLayer->name() );
532-
mMessageBarItem = QgsMessageBar::createMessage( title, msg );
532+
mMessageBarItem = QgsMessageBar::createMessage( title, msg, this );
533533
mMessageBar->pushItem( mMessageBarItem );
534534
}
535535
}

0 commit comments

Comments
 (0)
Please sign in to comment.