Skip to content

Commit

Permalink
can create relation reference in a widget (for custom UI forms)
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Aug 20, 2014
1 parent f9b15d3 commit 68bb52f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/gui/editorwidgets/qgsrelationreferencewidget.cpp
Expand Up @@ -174,7 +174,7 @@ void QgsRelationReferenceWidget::setRelationEditable( bool editable )

void QgsRelationReferenceWidget::setRelatedFeature( const QVariant& value )
{
QgsFeatureId fid = mFidFkMap.key( value );
const QgsFeatureId fid = mFidFkMap.key( value );
if ( mReferencedLayer )
setRelatedFeature( fid );
}
Expand Down
4 changes: 3 additions & 1 deletion src/gui/editorwidgets/qgsrelationreferencewidgetwrapper.cpp
Expand Up @@ -36,7 +36,9 @@ void QgsRelationReferenceWidgetWrapper::initWidget( QWidget* editor )
{
QgsRelationReferenceWidget* w = dynamic_cast<QgsRelationReferenceWidget*>( editor );
if ( !w )
return;
{
w = new QgsRelationReferenceWidget( editor );
}

mWidget = w;

Expand Down

0 comments on commit 68bb52f

Please sign in to comment.