Bug #5101
closed
Composite Actor windows show wrong title after workflow Rename
Added by Derik Barseghian over 14 years ago.
Updated almost 14 years ago.
Description
If you use the canvas Rename context menu to rename your workflow that contains composite actors, then Open Actor to see a composite actor's contents in a new window, this new window's title bar shows old_workflow_name#CompositeActor instead of new_name#CompositeActor. It doesn't matter if the Composite has been instantiated before or after the rename (so at least it's consistent).
You must currently Save or Save Archive before the composite actor windows use the right name in the title bar.
I have fixed this by overriding ptolemy.actor.gui.Configuration.
Due to issues with overrides, re-opening and re-targeting to an indefinite time in the future.
Retargeting this necessary fix back to 2.2.
Reassigning to Aaron to handle the merge to Ptolemy.
I'm not able to reproduce this bug.
What I tried:
1. Build kepler from the devel tree
2. ant run
3. In the left hand actor pane: Components -> General Purpose
4. Drag a CompositeActor into the graph pane
5. Right click on the CompositeActor, select Open Actor
The new window is titled Unamed1#CompositeActor
6. In the left hand actor pane: Actors -> CoreActors,kar
7. Drag in an Accumulator actor
8. Close the Unamed1#CompositeActor
9. In the top level window (title: Unnamed1), right click on
the CompositeActor and select "CustomizeName"
10. In the Rename CompositeActor window, change the Name field
to foo, hit commit.
11. The name of the actor changes to foo
12. Right click on foo, select Open Actor
13. The new window is named Unnamed1#foo.
There is likely a bug here, perhaps it involves a preexisting model or else
a model where the submodel window is left open (step 8 above is skipped).
Hi Christopher,
You are not replicating this bug properly. You need to rename the workflow (by right-clicking on the canvas) not rename the composite actor.
Aha, I finally tracked this down. The issue was that the Effigy for the ComponentEntity has a special StringAttribute attached to it called an identifier. The String that is created for the new frame is created using this identifier as seen in the Configuration._effigyIdentifier(Effigy,NamedObj) method. So all that was needed was to also update that effigy identifier in the RenameUtil.renameComponentEntity(ComponentEntity,String) method and now we're cooking with gas.
Original Bugzilla ID was 5101
Also available in: Atom
PDF