Skip to content

Fix empty value map drawer issue - #4751

Open
xkello wants to merge 2 commits into
masterfrom
bugfix/fix-value-map-empty-state
Open

xkello wants to merge 2 commits into
masterfrom
bugfix/fix-value-map-empty-state

Conversation

@xkello

@xkello xkello commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes #4748

A value map with an empty entry (empty value and description) could show an empty drop-down in the form, because the empty value reaches QML as undefined and breaks the list model.

What changed

MMFormValueMapEditor.qml turns an undefined value into an empty string when building the list.

Behaviour

All value map entries are shown, including the empty one.

@xkello
xkello requested a review from Withalion October 14, 2026 17:51
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 38890119696

Coverage increased (+0.04%) to 59.637%

Details

  • Coverage increased (+0.04%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 1 coverage regression across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

1 previously-covered line in 1 file lost coverage.

File Lines Losing Coverage Coverage
mm/app/layerfeaturesmodel.cpp 1 81.77%

Coverage Stats

Coverage Status
Relevant Lines: 15757
Covered Lines: 9397
Line Coverage: 59.64%
Coverage Strength: 93.98 hits per line

馃挍 - Coveralls

@github-actions

Copy link
Copy Markdown

馃摝 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build 馃摤 Mergin Maps 74141 dmg Expires: 12/01/2027 #7414
linux Build 馃摤 Mergin Maps 74401 x86_64 Expires: 12/01/2027 #7440
win64 Build 馃摤 Mergin Maps 66161 win64 Expires: 12/01/2027 #6616
Android Build 馃摤 Mergin Maps 872611 APK [armeabi-v7a] Expires: 12/01/2027 #8726
馃摤 QR code Google Play Store #8726
Android Build 馃摤 Mergin Maps 872651 APK [arm64-v8a] Expires: 12/01/2027 #8726
馃摤 QR code Google Play Store #8726
iOS Build 馃摤 Build number: 26.10.966611 #9666

@Withalion Withalion left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems alright. My humble opinion is that we should filter out these empty entries from the model as they are essentially NULL values and we support setting the value to NULL now from the drawer.

Comment thread app/qml/form/editors/MMFormValueMapEditor.qml Outdated
@xkello
xkello requested a review from Withalion October 16, 2026 10:52
@github-actions

Copy link
Copy Markdown

馃摝 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build 馃摤 Mergin Maps 74171 dmg Expires: 14/01/2027 #7417
linux Build 馃摤 Mergin Maps 74431 x86_64 Expires: 14/01/2027 #7443
win64 Build 馃摤 Mergin Maps 66191 win64 Expires: 14/01/2027 #6619
Android Build 馃摤 Mergin Maps 872911 APK [armeabi-v7a] Expires: 14/01/2027 #8729
馃摤 QR code Google Play Store #8729
Android Build 馃摤 Mergin Maps 872951 APK [arm64-v8a] Expires: 14/01/2027 #8729
馃摤 QR code Google Play Store #8729
iOS Build 馃摤 Build number: 26.10.966911 #9669

@Withalion Withalion left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We decided to keep these empty values in the drop down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Value map drop-down list is empty when the value map contains an empty entry

2 participants