Fix widget registry (SIP), few fixes for relation reference widget

This commit is contained in:
Denis Rouzaud 2014-09-16 13:31:30 +02:00
parent dce206e374
commit d05d83ed79
2 changed files with 9 additions and 6 deletions

View File

@ -49,7 +49,8 @@ class QgsEditorWidgetRegistry : QObject
QgsVectorLayer* vl,
int fieldIdx,
const QgsEditorWidgetConfig& config,
QWidget* editor, QWidget* parent,
QWidget* editor,
QWidget* parent /TransferThis/,
const QgsAttributeEditorContext context = QgsAttributeEditorContext() ) /Factory/;
/**

View File

@ -275,7 +275,7 @@ void QgsRelationReferenceWidget::mapToolDeactivated()
{
if ( mWindowWidget )
{
mWindowWidget->show();
mWindowWidget->raise();
}
if ( mMessageBar && mMessageBarItem )
@ -352,9 +352,9 @@ void QgsRelationReferenceWidget::setAllowMapIdentification( bool allowMapIdentif
mAllowMapIdentification = allowMapIdentification;
}
void QgsRelationReferenceWidget::setOpenFormButtonVisible(bool openFormButtonVisible)
void QgsRelationReferenceWidget::setOpenFormButtonVisible( bool openFormButtonVisible )
{
mOpenFormButton->setVisible(openFormButtonVisible);
mOpenFormButton->setVisible( openFormButtonVisible );
mOpenFormButtonVisible = openFormButtonVisible;
}
@ -518,9 +518,11 @@ void QgsRelationReferenceWidget::mapIdentification()
return;
mMapTool = new QgsMapToolIdentifyFeature( mCanvas, mReferencedLayer );
mMapTool->setAction( mMapIdentificationAction );
mCanvas->setMapTool( mMapTool );
mWindowWidget = window();
mWindowWidget->hide();
mCanvas->raise();
connect( mMapTool, SIGNAL( featureIdentified( QgsFeature ) ), this, SLOT( featureIdentified( const QgsFeature ) ) );
connect( mMapTool, SIGNAL( deactivated() ), this, SLOT( mapToolDeactivated() ) );
@ -580,5 +582,5 @@ void QgsRelationReferenceWidget::featureIdentified( const QgsFeature& feature )
}
if ( mWindowWidget )
mWindowWidget->show();
mWindowWidget->raise();
}