Active layer persists after map theme change - should activate first layer of new theme
Description When user changes the map theme in Mergin Maps mobile app and starts recording new features, the active layer from the previous theme remains active. This happens even if the current theme does not contain the layer (layer is inactive). After switching to another map theme, the first layer in the list of layers should be activated for recording.
Environment Staging
Application (+ app version, build, operating system)
- Plugin version: 2025.3.1
- Android version: Android 14
- iOS version: iOS 18.5
Steps to reproduce
- Open Mergin Maps app
- Open project tester-ws-1/tc04_recording
- Choose map theme "Paths and polygons"
- Record polygon in PolygonLayer
- Change map theme to "Aerial-points"
- Record new point -> active layer is PolygonLayer
Actual results
- Active layer from previous theme (PolygonLayer) remains selected after switching to new map theme ("Aerial-points")
- User can record features using a layer that may not be visible or active in the current theme
- Layer selection does not automatically update when changing map themes
Expected results
- After switching to another map theme, the first layer in the list of layers should be automatically activated for recording
- Active layer selection should be updated to match the new theme's layer configuration
- User should not be able to record on layers that are inactive in the current theme
Screenshots or logs Reference project: tester-ws-1/tc04_recording Test performed on both Android and iPhone devices in staging environment
Conclusion Created by GitHub Copilot and supervised by a human test analyst.
We also experience this bug where changing Map Theme does not change the default active map layer, resulting in regular inaccurate logging
Re-tested: App version: 2025.7.0 (build 814011) iOS version: iOS 26.0 Reference project: tester-ws-1/test_map_themes
Re-tested: App version: 2025.7.0 (build 721011) Device/OS: Samsung Tab S3/ Android 9 Reference project: tester-ws-1/test_map_themes
Re-tested - This behavior still persists.
*Application (+ app version, build, operating system) App version: 25.7.0 (build 725411) OS: Android 15.0 (tested on Redmi A3, ABI eabi‑v7A) Reference project: tester-ws-1/test_map_themes