theRAPTLab / gsgo

GEM-STEP Foundation repo migrated from GitLab June 2023
1 stars 1 forks source link

Deleted blueprints reappearing #422

Closed benloh closed 1 year ago

benloh commented 2 years ago

Blueprints that have been renamed or deleted are re-appearing as choices in EditSymbol.

To Replicate

  1. Open a blueprint
  2. Select the blueprint name and change the name to something else, e.g. from Fish to Shark
  3. Save the line.
  4. Add a new line
  5. Set prop as the keyword
  6. Select the object reference
  7. In the list of "blueprints" that are displayed, "Shark" is properly displayed, and "Fish" is gone.
  8. Click on the "agent" choice in the EditSymbol selector (not the "objref" slot at the top)
  9. "Fish" will then suddenly re-appear in the list of blueprints.

Analysis

The reason for this is rather subtle and complex. Suffice to say slots_bundle is not properly updated with the newly revised cur_bdl. slots_bundle should always be revised whenever cur_bdl changes.

benloh commented 2 years ago

RAW NOTES

Select Line

  1. EDITMGR.DispatchClick(tokenKey) => WIZCORE.SendState(sel_linenum)
  2. EDITMGR.handleWizUpdate(sel_linenum) => SLOTCORE.SendState(slots_linescript)
  3. EDITMGR.handleSlotUpdate(slots_linescript) => SLOTCORE.slots_bundle = WIZCORE.cur_bdl.clone() => SLOTCORE.SendState(slots_bundle, slots_validation)

The slot editor keeps it's own copy of the current bundle slots_bundle that is separate from the wizcore bundle. The slots_bundle is updated with the change. So initially the list of available blueprints is correct.

benloh commented 2 years ago

Should be fixed with fdb87dc2da52b142560d65ab4c99d57be9d3ba91

benloh commented 2 years ago

mentioned in commit fdb87dc2da52b142560d65ab4c99d57be9d3ba91

benloh commented 2 years ago

See !256 for fix.