Ecdar / Ecdar-GUI

A graphical tool for modeling using ECDAR (Environment for Compositional Design and Analysis of Real Time Systems)
MIT License
3 stars 5 forks source link

Component retention across projects #141

Open Nielswps opened 1 year ago

Nielswps commented 1 year ago

Components are retained across projects when the split canvas view is used. An example can be seen below:

comp_retention

How to recreate

  1. Open GUI
  2. Press the View->Split canvas option
  3. Set a component as the active component in one of the views
  4. Open another project (either an existing or a new one)
  5. Press the View->Split canvas option again
  6. See that the component previously set as the active component reappears in this unconnected project

Possible cause I personally think that this issue is due to the canvas not being re-initialized/properly cleared when a new project is open.

A good solution would be to completely re-initialize this part of the UI when a new project is opened. This is probably best to do AFTER the simulation functionality is merged in (see #82 ), as it was suggested to separate the editor and simulator in two separate scenes/stages (see #121 ).

Having this separation would make it easy to ensure that all the elements of the previous project are removed from memory.