ComponentPtrs not updated after Component rename


#1

Hi,

Another bug report.

When renaming a Component, all ComponentPtrs that point to it will get visibly updated in the napkin editor, but not in the underlying json-file.

Steps to reproduce:

  1. Create Component A with mID ‘foo’.
  2. Create a Component B with a ComponentPtr. Point the ComponentPtr to Component A (‘foo’).
  3. Save.
  4. Rename Component A to ‘bar’.
  5. Save and run the app.

Although in the napkin editor the value of the ComponentPtr now shows ‘bar’, in the json-file the value is still ‘foo’, producing a failure on initialisation.
Only after double-clicking/editing the ‘value’ field of the ComponentPtr and saving again, the value in the json-file gets updated correctly.

Greetings,
Casimir


#2

Yup, clear bug there. Could be that it is already fixed but not released. @bas, can you verify this?


#3

Thanks, Casi, for the clear repro case.

I was able to repro and I believe this fix on master will resolve the issue: cf0c59a58ff06e2554b3531a2982428220cf7a0c (refactor pointers when changing object names)