Skip to content

Bug: shape changes in a second window are not saved to the project #88

Open

Description

@StackEnjoyer

Problem

  • A change of the shape on the card of an object in a second window (open_system) of a project is not saved: the object changes, its line in system.jl keeps the old value
  • The change is lost when the project is opened again, and the other participants never see it; expected: saved like the same change in the project's window
  • Seen on main 5152a1e (Julia 1.13.0, Windows)
# `dir`: a project as in test/TestLiveProjectOwnTypes.jl, K1 = Block(0.025, 0.005) with a width slider on its card
gui = open_project(dir; display = false)
k1 = only(x for (x, (name, _)) in gui.sync.ids if name === :K1)
second = open_system(gui, only(BeamletOpticsGUI._systems(gui)); display = false)
select!(second, k1)
Makie.set_close_to!(card_widget(second, k1, :width), 40.0)
k1.shape.diameter                                 # 0.04
BeamletOpticsGUI._autosave!(gui; force = true)    # :none
# system.jl still has: @component K1 = Block(0.025, 0.005) pos = (0.0, 0.1, 0.0)

Tasks

  • A change of the shape in a second window is saved to the project like one in the project's window
  • Undo in either window brings the old shape back, also in the files

Notes

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