Bug 562657

Summary: FillLayout does not work with a dynamic mapping
Product: [Modeling] Sirius Reporter: Cedric Notot <cedric.notot>
Component: PropertiesAssignee: Project Inbox <sirius.properties-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: pierre-charles.david
Version: 6.3.0Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
Whiteboard:
Attachments:
Description Flags
Example on basicfamily
none
The broken (vertically stacked) widget layout when using a for loop
none
The correct (horizontal) widget layout when the for loop is not used none

Description Cedric Notot CLA 2020-04-30 06:33:33 EDT
If you use a dynamic mapping (with several conditions) in a container description with a Fill Layout Horizontal, this last one is not applied.

A workaround could consist in using a Grid Layout (if you know the number of widgets to be displayed).
Comment 1 Cedric Notot CLA 2020-04-30 06:35:05 EDT
Created attachment 282633 [details]
Example on basicfamily
Comment 2 Pierre-Charles David CLA 2020-05-04 11:20:14 EDT
Confirmed, thanks for the report.

Steps to reproduce:

1. Import the basic family metamodel & launch a runtime, or install it directly in the host
2. Import the attached project in the workspace.
3. Create a modeling project with a sample basicfamily instance, for example using the "Basic Family Sample Model" example.
4. Enable the viewpoint defined in the test VSM.
5. Create and open a diagram on the sample model.
6. Select one of the "Person" on the diagram.

Expected: the "First name" and "Last name" properties should be on the same line, as requested by the "HORIZONTAL" Fill Layout defined in the VSM.

Actual: the two properties are stacked vertically (default layout).

In the VSM, if you move the firstName & lastName widgets out of the For loop (and remove the loop) and then save, the HORIZONTAL layout is correctly applied.
Comment 3 Pierre-Charles David CLA 2020-05-04 11:21:42 EDT
Created attachment 282686 [details]
The broken (vertically stacked) widget layout when using a for loop
Comment 4 Pierre-Charles David CLA 2020-05-04 11:22:13 EDT
Created attachment 282687 [details]
The correct (horizontal) widget layout when the for loop is not used