Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conditional visibility of the relation widget #2861

Merged
merged 1 commit into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/attributes/attributecontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ void AttributeController::flatten(
parentTabRow,
FormItem::Relation,
label,
parentVisibilityExpressions, // relation field doesn't have visibility expression itself
associatedRelation
)
);
Expand Down
18 changes: 9 additions & 9 deletions app/attributes/attributedata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ FormItem *FormItem::createFieldItem(
);
}

FormItem *FormItem::createRelationItem(
const QUuid &id,
const QString &groupName,
int parentTabId,
FormItemType type,
const QString &name,
const QgsRelation &relation
)
FormItem *FormItem::createRelationItem( const QUuid &id,
const QString &groupName,
int parentTabId,
FormItemType type,
const QString &name,
const QgsExpression &visibilityExpression,
const QgsRelation &relation
)
{
FormItem *item = new FormItem(
id,
Expand All @@ -90,7 +90,7 @@ FormItem *FormItem::createRelationItem(
true,
QgsEditorWidgetSetup(),
-1,
QgsExpression(),
visibilityExpression,
relation
);
return item;
Expand Down
1 change: 1 addition & 0 deletions app/attributes/attributedata.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ class FormItem
int parentTabId,
FormItem::FormItemType type,
const QString &name,
const QgsExpression &visibilityExpression,
const QgsRelation &relation
);

Expand Down
Loading