Skip to content

Commit d05d83e

Browse files
committedSep 16, 2014
Fix widget registry (SIP), few fixes for relation reference widget
1 parent dce206e commit d05d83e

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed
 

‎python/gui/editorwidgets/core/qgseditorwidgetregistry.sip

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ class QgsEditorWidgetRegistry : QObject
4949
QgsVectorLayer* vl,
5050
int fieldIdx,
5151
const QgsEditorWidgetConfig& config,
52-
QWidget* editor, QWidget* parent,
52+
QWidget* editor,
53+
QWidget* parent /TransferThis/,
5354
const QgsAttributeEditorContext context = QgsAttributeEditorContext() ) /Factory/;
5455

5556
/**

‎src/gui/editorwidgets/qgsrelationreferencewidget.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ void QgsRelationReferenceWidget::mapToolDeactivated()
275275
{
276276
if ( mWindowWidget )
277277
{
278-
mWindowWidget->show();
278+
mWindowWidget->raise();
279279
}
280280

281281
if ( mMessageBar && mMessageBarItem )
@@ -352,9 +352,9 @@ void QgsRelationReferenceWidget::setAllowMapIdentification( bool allowMapIdentif
352352
mAllowMapIdentification = allowMapIdentification;
353353
}
354354

355-
void QgsRelationReferenceWidget::setOpenFormButtonVisible(bool openFormButtonVisible)
355+
void QgsRelationReferenceWidget::setOpenFormButtonVisible( bool openFormButtonVisible )
356356
{
357-
mOpenFormButton->setVisible(openFormButtonVisible);
357+
mOpenFormButton->setVisible( openFormButtonVisible );
358358
mOpenFormButtonVisible = openFormButtonVisible;
359359
}
360360

@@ -518,9 +518,11 @@ void QgsRelationReferenceWidget::mapIdentification()
518518
return;
519519

520520
mMapTool = new QgsMapToolIdentifyFeature( mCanvas, mReferencedLayer );
521+
mMapTool->setAction( mMapIdentificationAction );
521522
mCanvas->setMapTool( mMapTool );
522523
mWindowWidget = window();
523-
mWindowWidget->hide();
524+
mCanvas->raise();
525+
524526
connect( mMapTool, SIGNAL( featureIdentified( QgsFeature ) ), this, SLOT( featureIdentified( const QgsFeature ) ) );
525527
connect( mMapTool, SIGNAL( deactivated() ), this, SLOT( mapToolDeactivated() ) );
526528

@@ -580,5 +582,5 @@ void QgsRelationReferenceWidget::featureIdentified( const QgsFeature& feature )
580582
}
581583

582584
if ( mWindowWidget )
583-
mWindowWidget->show();
585+
mWindowWidget->raise();
584586
}

0 commit comments

Comments
 (0)
Please sign in to comment.