Bug 515540 - [State Machine] Region name label in composite state's nested diagram acts as a strut
Summary: [State Machine] Region name label in composite state's nested diagram acts as...
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 14:05 EDT by Christian Damus CLA
Modified: 2017-04-21 12:55 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 14:05:27 EDT
This bug was found in testing of the fix for bug 513794.

Since the aforementioned bug was fixed, the size of a nested state machine diagram for a composite state seems to track correctly the size of the frame of the nested diagram from which it inherits, but only after the first time the parent diagram frame is resized.  On the first occasion, the width of the inheriting diagram does not change, only the height.  Subsequent changes to the width of the parent diagram are correctly tracked in the inheriting diagram.

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 containing a composite state S.
3. Double-click S to create a nested diagram for it, A..S.
4. Set A as a superclass of B and open the state machine diagram that now B should have.
5. Double-click the state S in this diagram to create its nested diagram, B..S.
6. Using the Edit Parts Hierarchy view from the Papyrus Developer Tools, in the B..S nested state machine diagram inspect the size of the Region edit-part's figure and take note of the size.
7. In A's nested 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.
8. In the B..S diagram, again inspect the region edit-part and observe that it now has the same smaller height as the region in A..S but still the original width.
9. Shrink the frame in the A..S diagram again in both dimensions.
10. Observe that now the diagram frame in B..S matches A..S.

Briefly debugging the problem, it seems that on the first occasion, the name edit-part for the region in the B..S diagram responds to the shrinking of the width of the region by propping it like a strut, reverting the width of the the region to the width that the name label wants to have, which is what the region's width previously was.  But this seems to happen only once.