Skip to content

Commit

Permalink
Self referencing relations: do not repeatedly embed dual view
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Oct 22, 2014
1 parent 5f9e45a commit da98a3c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/gui/editorwidgets/qgsrelationwidgetwrapper.cpp
Expand Up @@ -56,10 +56,9 @@ void QgsRelationWidgetWrapper::initWidget( QWidget* editor )
const QgsAttributeEditorContext* ctx = &context();
do
{
if ( ctx->relation().name() == mRelation.name() && ctx->relationMode() == QgsAttributeEditorContext::Multiple )
if ( ctx->relation().name() == mRelation.name() && ctx->formMode() == QgsAttributeEditorContext::Embed )
{
w->setSaveCollapsedState( false );
w->setCollapsed( true );
w->setVisible( false );
break;
}
ctx = ctx->parentContext();
Expand Down

0 comments on commit da98a3c

Please sign in to comment.