Skip to content

StandardApp, OlMap, ZoomButtons: handle a map container without a size - #803

Merged
manisandro merged 1 commit into
qgis:masterfrom
dominik-warch:fix/map-size-zero
Oct 29, 2026
Merged

manisandro merged 1 commit into
qgis:masterfrom
dominik-warch:fix/map-size-zero

Conversation

@dominik-warch

Copy link
Copy Markdown
Contributor

Part of #753.

An embedded viewer can be mounted into a hidden container, for example an inactive tab of a host form. THe theme was then set up with a map with size 0, zoom to extent stored NaN and the ZoomButton's state update never ended. React unmounts the viewer ("Maximum update depth exceed").

This PR...

  • sets up the theme only when the map has a size (StandardApp)
  • OlMap reports the size when it first gets one (this fires no moveend)
  • ZoomButton derives it's disabled from its props instead of state.

@manisandro
manisandro merged commit ba1b361 into qgis:master Oct 29, 2026
2 checks passed
@manisandro

Copy link
Copy Markdown
Member

Thanks!

@dominik-warch
dominik-warch deleted the fix/map-size-zero branch October 29, 2026 18:20
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.

2 participants