Skip to content

Unsaved built-in resources dialog sometimes does not show unsaved shaders #122541

Description

@TheDying0fLight

Tested versions

  • v4.7.1.stable
  • v4.8.dev (c382f9c) (master)

System information

Godot v4.7.1.stable - Windows 11 (build 26200) - Multi-window, 2 monitors - Direct3D 12 (Forward+) - dedicated NVIDIA GeForce RTX 4080 SUPER (NVIDIA; 32.0.15.9186) - AMD Ryzen 7 7800X3D 8-Core Processor (16 threads) - 63.11 GiB memory - WASAPI (48000 Hz, Stereo/mono)

Issue description

When changing built-in resources the unsaved changes dialog does only show unsaved built-in shaders if there are no unsaved built-in scripts. Even when clicking on Cancel or Don't Save (for the built-in scripts) it does not ask about the shaders in a second dialog. It looks like get_unsaved_status is first called on the script editor and if it returns something it does not continue to the shader editor, maybe the get_unsaved_status functions can be combined now that both plugins use ScriptEditor

Unsaved script and shader ("test" is a script and closing this dialog in any way does not show the shader dialog)

Image

Only unsaved shader

Image

Steps to reproduce

  • Create a new project with a built-in shader and script
  • Edit both without saving and try to close the scene, now a confirmation dialog only asking to save the script should show
  • Save, edit only the shader and try to close the scene, now it correctly shows the unsaved shader in the dialog

Minimal reproduction project (MRP)

N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status
    For team assessment

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions