Bug 510763 - Icon update fails when the style is changed but initialization is ok when you reopen the diagram
Summary: Icon update fails when the style is changed but initialization is ok when you...
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: 3.1.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: backport
Keywords: triaged
: 520637 544884 (view as bug list)
Depends on:
Blocks: 520637
  Show dependency tree
 
Reported: 2017-01-20 09:11 EST by Wilbert Alberts CLA
Modified: 2019-04-29 05:21 EDT (History)
4 users (show)

See Also:


Attachments
Reproduction case (3.48 KB, application/zip)
2017-04-20 07:33 EDT, Maxime Porhel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wilbert Alberts CLA 2017-01-20 09:11:52 EST
Steps to reproduce:

1) Create a vsp containing representations for nodes and edges
2) Ensure that vsp has two layers.
3) In second layer, add style customization that enables edge label icon to be shown.
4) Create model and diagram containing nodes and edges
5) Enable second layer, icons for edge labels are not updated.
6) Close and reopen diagram, icons for edge labels are shown.

Note: bug triggered on Eclipse Mars.2 with Sirius 3.1.4 on PC.
Comment 1 Maxime Porhel CLA 2017-04-20 07:24:54 EDT
Hi Wilbert, 

Thanks for your detailed bug report.
We have reproduced this issue and we reckon it is valid. 
Nevertheless, it's not yet in the scope of a future release.
Comment 2 Maxime Porhel CLA 2017-04-20 07:33:02 EDT
Created attachment 267876 [details]
Reproduction case

Attachement to complete steps to reproduce provided by Wilbert. 

Note that the sample shows that the node and container icon are well shown/hidden without any need to close/reopen the diagram. 

See 
. org.eclipse.sirius.diagram.ui.edit.internal.part.DiagramNodeEditPartOperation.refreshFigure(IStyleEditPart)
. org.eclipse.sirius.diagram.ui.edit.internal.part.DiagramElementEditPartOperation.refreshLabelAndIcon(IDiagramElementEditPart, DDiagramElement, SiriusWrapLabel)

It seems that the refreshVisual method of edge labels is not triggered on the showIcon change. It should follow the same logic than node and containers.
Comment 3 Maxime Porhel CLA 2017-08-16 05:35:51 EDT
*** Bug 520637 has been marked as a duplicate of this bug. ***
Comment 4 Maxime Porhel CLA 2017-08-16 05:37:27 EDT
Bug 520637 has been closed as duplicate of this bug. Its description only described edge icon issue whereas the problem exists for Node and Edge (and maybe also for containers) as described here.
Comment 5 Tjalling Ran CLA 2019-04-26 11:29:26 EDT
*** Bug 544884 has been marked as a duplicate of this bug. ***
Comment 6 Adrian Yankov CLA 2019-04-29 05:21:35 EDT
Is anybody working on a fix?