Skip to content

[BUG] Canvas Size, Image Size, Crop, Trim and some adjustments drop layer effects and live text #180

Description

@naco-siren

Summary

Some edits silently throw away part of a layer:

  • Canvas Size, Image Size, Crop and Trim remove the effects from every layer, and turn text and shape layers into plain pixels, so they can no longer be edited.
  • Hue/Saturation, Levels, Invert and Transform Selection remove the effects from the layer they change.

Undo brings everything back, but it's easy not to notice until much later. LayerEffects is documented as kept with the layer "so it follows every edit", and docs/project-format.md says canvas-size changes preserve editable text.

Steps to reproduce

  1. File › New Canvas…
  2. With the Type tool (T), click the canvas and type some text.
  3. In the Layers panel, click the effects button (the sparkles) › Drop Shadow…, and confirm.
  4. Image › Canvas Size…, make the canvas larger, and click OK.

Expected: the text layer keeps its drop shadow and is still editable text.
Actual: the shadow is gone and the layer is plain pixels. Image Size…, Trim… and the Crop tool do the same.

For the adjustments: give a pixel layer a Stroke, then Image › Hue/Saturation…, move Hue and click OK. The stroke is gone. Image › Levels…, Image › Invert and Layer › Transform Selection (move a marquee selection, then press Return) do the same.

Cause

  • Canvas Size, Image Size, Crop and Trim all end in EditorSession.applyDocumentSize(_:actionName:) (Compositor/IO/ImageResizer.swift). It rebuilds every ImageLayer from the snapshot without shape, effects or text, unlike installProject (Compositor/Document/EditorSession+Projects.swift), which rebuilds the same layers when a project opens. CanvasResizer also leaves effects out of the layer records it writes.
  • commitHueSaturation (HueSaturation.swift), commitLevels (Levels.swift), invertPixels (SelectionEdits.swift) and mergeFloatingTransform (FloatingSelection.swift) rebuild the layer without effects:. The brush and filter commits pass effects: current.effects.

Compositor 1.4.5 (11d8d7a), macOS 27.0, Apple silicon.

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions