Bug 515538 - [State Machine] Redoing region resizing in superclass makes subclass region become wider
Summary: [State Machine] Redoing region resizing in superclass makes subclass region b...
Status: NEW
Alias: None
Product: Papyrus-rt
Classification: Modeling
Component: tool (show other bugs)
Version: 1.0.0   Edit
Hardware: PC Mac OS X
: P3 normal
Target Milestone: Future   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: Documentation
Depends on:
Blocks:
 
Reported: 2017-04-20 13:57 EDT by Christian Damus CLA
Modified: 2017-04-21 12:54 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Damus CLA 2017-04-20 13:57:45 EDT
This bug was found in testing of the fix for bug 513794.

Since the aforementioned bug was fixed, the size of a state machine diagram seems to track correctly the size of the frame of the diagram from which it inherits.  And the region within that frame seems to correctly fill up the entire space, without leaving dead space of the state machine compartment at the bottom or right, nor showing scrollbars.

However, undo/redo shows some odd behaviour that seems at first look to be coming from within some of the "zone" layout machinery.  Whenever a change in the superclass diagram that shrinks the width of a region is undone and then redone, the corresponding region in a subclass diagram isn't shrunk again but is actually *expanded* by the amount that it should have been shrunk.

Steps to reproduce:

1. Create a UML-RT model with the C++ template as a convenience for applying the state machine profile.
2. Create capsules A and B, with a state machine in A.
3. Set A as a superclass of B and open the state machine diagram that now B should have.
4. Using the Edit Parts view from the Papyrus Developer Tools, in the B state machine diagram inspect the size of the Region edit-part's figure and take not of the size.
5. In A's state machine diagram, shrink the frame in both the height and width dimensions.  Inspect the region edit-part and note its new smaller size.
6. In B's state machine, again inspect the region edit-part and observe that it now has the same smaller size as the region in A.
7. Undo.
8. Inspect the region edit-part in both diagrams and observe that they both return to the original size noted at step 4.
9. Redo.
10. Inspect the region edit-parts in both diagrams and observe that A's region has correctly returned to the smaller size noted in step 6.  Observe that in the B region the height is correctly restored to the smaller value but the width is now greater than the original width by the same amount that it should have been smaller.