Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0 branch (discontinued)
-
None
Description
I'm reAttaching a component doing something like:
MyFooPanel p1 = new MyFooPanel(this, "panel";
MyBarPanel p2 = new MyBarPanel(this, "panel");
p1.reAttach();
When I try to restore to the initial page version I found that the component with id "panel" is not a children component of the page.
I have investigated it and I think it is because when the component is reAttached the order in which the changes are added to the ChangesList is:
- Add p2.
- Remove p1.
When the initial version is restored the undo functionality is done in reverse mode like,
- Add p1.
- Remove p2.
The problem is p1 and p2 have the same id, so when p2 is removed what is removing is p1 that has just added.
Oscar.