Skip to content

Export panel and presets resets destination mode to "Absolute Path" or "Subfolder of source" when opening an image #602

Description

@paulglover

What happens

Open any image and the Export panel's DESTINATION → Folder dropdown reads "Absolute path", regardless of what was saved.

Steps to reproduce

  1. Set Folder to "Same as source" and pick an export folder.
  2. Open another image (or restart).
  3. Folder reads "Absolute path" while the Path row is not visible.

A similar result is observed in the settings preset, but shows a different default ("Subfolder of source") instead of the last saved setting.

Actual exports go to the saved setting's destination.

Cause

ExportSettingsForm.load() selects the row with output_mode_combo.findData(mode). The combo stores ExportPresetOutputMode StrEnum members as item data, but a persisted config comes back as a plain str — settings round-trip through JSON via asdict(config.export) → the last_export_config global setting, and the per-file DB config. findData compares across the QVariant boundary, where a plain string never matches the enum member, so it returns -1 and the combo stays on index 0. Visibility of the Subfolder/Path rows is computed separately in Python, where StrEnum == str holds — hence the mismatch.

Introduced in 3ef6786 (#264). Affects the presets dialog too, which loads the same form from JSON-persisted presets. Every other findData combo in the codebase stores .value strings, so this widget is the only one affected.

Fix: normalize the value to the enum before lookup, falling back to ABSOLUTE for unknown/missing values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions