Skip to content

Commit

Permalink
Fix widget registry (SIP), few fixes for relation reference widget
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Sep 16, 2014
1 parent dce206e commit d05d83e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion python/gui/editorwidgets/core/qgseditorwidgetregistry.sip
Expand Up @@ -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/;

/**
Expand Down
12 changes: 7 additions & 5 deletions src/gui/editorwidgets/qgsrelationreferencewidget.cpp
Expand Up @@ -275,7 +275,7 @@ void QgsRelationReferenceWidget::mapToolDeactivated()
{
if ( mWindowWidget )
{
mWindowWidget->show();
mWindowWidget->raise();
}

if ( mMessageBar && mMessageBarItem )
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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() ) );

Expand Down Expand Up @@ -580,5 +582,5 @@ void QgsRelationReferenceWidget::featureIdentified( const QgsFeature& feature )
}

if ( mWindowWidget )
mWindowWidget->show();
mWindowWidget->raise();
}

0 comments on commit d05d83e

Please sign in to comment.