mobile icon indicating copy to clipboard operation
mobile copied to clipboard

Active layer persists after map theme change - should activate first layer of new theme

Open RastoHu opened this issue 5 months ago • 4 comments

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

  1. Open Mergin Maps app
  2. Open project tester-ws-1/tc04_recording
  3. Choose map theme "Paths and polygons"
  4. Record polygon in PolygonLayer
  5. Change map theme to "Aerial-points"
  6. 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.

RastoHu avatar Jul 31 '25 12:07 RastoHu

We also experience this bug where changing Map Theme does not change the default active map layer, resulting in regular inaccurate logging

HugoP27 avatar Aug 27 '25 07:08 HugoP27

Re-tested: App version: 2025.7.0 (build 814011) iOS version: iOS 26.0 Reference project: tester-ws-1/test_map_themes

IvaKuklica avatar Oct 22 '25 08:10 IvaKuklica

Re-tested: App version: 2025.7.0 (build 721011) Device/OS: Samsung Tab S3/ Android 9 Reference project: tester-ws-1/test_map_themes

IvaKuklica avatar Oct 29 '25 07:10 IvaKuklica

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

IvaKuklica avatar Nov 05 '25 09:11 IvaKuklica