Bug 494181 - Pb of size for node using custom style and image
Summary: Pb of size for node using custom style and image
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: 3.1.0   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2016-05-20 10:42 EDT by Laurent Redor CLA
Modified: 2017-10-12 12:30 EDT (History)
1 user (show)

See Also:


Attachments
customStyle.vsp.zip (11.96 KB, application/x-zip-compressed)
2016-05-20 10:42 EDT, Laurent Redor CLA
no flags Details
customStyle.sample.zip (2.93 KB, application/x-zip-compressed)
2016-05-20 10:42 EDT, Laurent Redor CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Redor CLA 2016-05-20 10:42:02 EDT
Created attachment 261900 [details]
customStyle.vsp.zip

For a node using a WorkspaceImage style, if the "size computation expression" is "-1", the size of the node is computing according to image size.
It seems not possible to do the same for a Custom style with an edit part that uses an image.

Steps to reproduce:
* Import the project customStyle.vsp (from customStyle.vsp.zip) in your workspace
* Launch a runtime
* Import the project SampleWithCustomStyle (from customStyle.sample.zip) in your runtime
* Open the diagrm
* OK: The border node using a workspace image has the size of the image: 16x16 pixels.
* KO: The custom style that uses the same image has not the size of the image.
Comment 1 Laurent Redor CLA 2016-05-20 10:42:24 EDT
Created attachment 261901 [details]
customStyle.sample.zip
Comment 2 Laurent Redor CLA 2016-05-20 10:51:05 EDT
There is specific code in DNodeQuery.getDefaultDimension() for the WorkspaceImage style but no way to make similar for Custom style.

A solution would be to have a size computation expression in pixels (and not in ten pixels). This solution is impacting (migration of existing expressions) but seems to be the best.
Comment 3 Laurent Fasani CLA 2016-05-23 11:06:31 EDT
reproduced on sirius 4 master 23/05/2016

Note that you can select the node with the custom style to better put the issue in evidence (selection is larger than the icon)