Skip to content

[Bug]: Switching map silently drops an unsaved Format text and cancels a service import in flight #2987

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.

What happened?

Two things the user has started on one map are dropped, with no notice, when another map is put in view:

  1. A text typed in the Format pane for a map text (graphicformat::save_draft, graphicformat.rs:182): a draft not yet saved when the map in view changes is dropped, because its layer id and row belong to the map it was typed on. The Format pane then shows "Select one text on the map".
  2. An Add From Service import in flight (serviceui::poll, serviceui.rs:469): the import is given up (download_failed) when the map in view changes, deleted, replaced or renamed, and nothing says so. The layers the user asked for never arrive.

Both predate #2975, which only makes them survive a map being moved among the maps.

Steps to reproduce

  1. Select a map text so the Format pane opens, type in its text box and, without leaving it, pick another map in the Browser: the typed text is gone.
  2. Start Add From Service on a slow service and switch map before it lands: nothing is added and nothing says why.

Expected behavior

Each says what was dropped, once, through Session::notify (e.g. "Text typed for a map that isn't in view was not saved." and "The service import was cancelled because the map in view changed."). Saving the typed text to its own map is a larger change and is not asked for here.

How are you running RustGIS?

Desktop app (built from source)

Version

main at the commit the PR starts from

Operating system, browser and graphics

Linux (Fedora), any.

Sample data

No response

Screenshots or logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions