File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -59,11 +59,14 @@ void QgsRelationWidgetWrapper::initWidget( QWidget* editor )
59
59
60
60
w->setEditorContext ( myContext );
61
61
62
+ QgsRelation nmrel = QgsProject::instance ()->relationManager ()->relation ( config ( " nm-rel" ).toString () );
63
+
62
64
// If this widget is already embedded by the same relation, reduce functionality
63
65
const QgsAttributeEditorContext* ctx = &context ();
64
66
do
65
67
{
66
- if ( ctx->relation ().name () == mRelation .name () && ctx->formMode () == QgsAttributeEditorContext::Embed )
68
+ if (( ctx->relation ().name () == mRelation .name () && ctx->formMode () == QgsAttributeEditorContext::Embed )
69
+ || ctx->relation ().name () == nmrel.name () )
67
70
{
68
71
w->setVisible ( false );
69
72
break ;
@@ -72,7 +75,6 @@ void QgsRelationWidgetWrapper::initWidget( QWidget* editor )
72
75
}
73
76
while ( ctx );
74
77
75
- QgsRelation nmrel = QgsProject::instance ()->relationManager ()->relation ( config ( " nm-rel" ).toString () );
76
78
77
79
w->setRelations ( mRelation , nmrel );
78
80
You can’t perform that action at this time.
0 commit comments