Skip to content

[Bug]: layout.publication sizes its legend by layers it doesn't list #3160

Done

Description

@jgregoriorincon

Before you start

  • I searched the existing issues and did not find a duplicate.
  • This is a bug report, not a usage question (questions belong in Discussions).

What happened?

layout.publication sizes its legend as if it listed every layer, in two places:

  • While any layer of the map is still reading, the legend gets a fixed size and the warning "the legend's classes aren't known yet (a layer still reading)", even when that layer isn't in the legend (one left out as context, or by legend.exclude in feat(layout): leave out a publication's legend or set its title, columns and layers #3127) and the listed layers' classes are known. sync_sources_in answers one flag for every layer.
  • A complete source that can't be read stops the legend being measured even when the legend leaves that layer out: asked_rows (crates/render/src/layout/legend.rs) reads the complete sources before it filters the rows.

Found reading the code.

Steps to reproduce

  1. Open a map with a vector layer already read and a raster read in place from a slow address.
  2. Run layout.publication {"legend": {"exclude": ["<the raster>"]}} while the raster is still reading.

Expected behavior

The legend is sized by its listed layers' rows alone, with no notice about the others.

How are you running RustGIS?

All builds: the command is shared.

Version

main (0.8.0)

Activity

  1. jgregoriorincon commented on Nov 27, 2026

    @jgregoriorincon
    ContributorAuthor

    I'll take this.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions