Bug 282077 - [ImageSupport] Editparts need to be sorted in z-order when selection is exported to image
Summary: [ImageSupport] Editparts need to be sorted in z-order when selection is expor...
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 2.2   Edit
Hardware: PC Windows XP
: P3 normal
Target Milestone: 2.2.1   Edit
Assignee: Alex Boyko CLA
QA Contact:
URL:
Whiteboard: 2.1.4 patch
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-30 16:55 EDT by Alex Boyko CLA
Modified: 2009-10-15 15:32 EDT (History)
1 user (show)

See Also:


Attachments
proposed patch (7.69 KB, patch)
2009-06-30 17:11 EDT, Alex Boyko CLA
no flags Details | Diff
2.1.4 compatible patch (4.00 KB, patch)
2009-09-14 17:30 EDT, Alex Boyko CLA
no flags Details | Diff
2.1.4 additional patch missed in the first 2.1.4 patch (4.12 KB, patch)
2009-10-15 15:29 EDT, Alex Boyko CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Boyko CLA 2009-06-30 16:55:11 EDT
1. Create a large rectangle geoshape
2. Create a small ellipse geoshape and place it in the middle of the rectangle
3. Select ellipse and then using "Ctrl" button append the large rectangle to the selection.
4. Save the selection to image from the context menu or copy paste the selection into MS Word.

Note that the ellipse doesn't show up on the image. It is overlapped by the rectangle.

Therefore editparts to be exported to image are to be supplied sorted by their z-order on the diagram.

Note that when the whole diagram is exported to image editparts don't need to be sorted (primary editparts are sorted as needed already).

The complication is where to sort the editparts in z-order... on the diagram generator level or before they are passed to the diagram generator, i.e. when ui delegates to image generation utilities.

I'm thinking of sorting them before they are passed to diagram generator to reduce the behavior change impact.
Comment 1 Alex Boyko CLA 2009-06-30 17:11:28 EDT
Created attachment 140545 [details]
proposed patch

Patch for sorting editparts before they get to diagram generator.
Comment 2 Anthony Hunter CLA 2009-07-08 16:52:10 EDT
Hi Alex, the patch looks good to put into R2_2_maintenance and HEAD.
Comment 3 Alex Boyko CLA 2009-07-08 17:56:46 EDT
Committed to HEAD and maintenance for 2.3 and 2.2.1
Also changed the default file format to PNG from GIF (not part of the attached patch)
Comment 4 Alex Boyko CLA 2009-09-14 17:29:02 EDT
Fix is reqyired for 2.1.4 patch build
Comment 5 Alex Boyko CLA 2009-09-14 17:30:59 EDT
Created attachment 147144 [details]
2.1.4 compatible patch

2.1.4 compatible patch uploaded
Comment 6 Anthony Hunter CLA 2009-09-17 14:35:54 EDT
Patch is good to commit to R2_1_maintenance.
Comment 7 Alex Boyko CLA 2009-09-17 16:48:32 EDT
Committed to R2_1_maintenance
Comment 8 Alex Boyko CLA 2009-10-15 15:25:24 EDT
2.1.4 patch is missing the fix for CopyImageCommand class that is present in 2.2.x fix
Comment 9 Alex Boyko CLA 2009-10-15 15:29:43 EDT
Created attachment 149673 [details]
2.1.4 additional patch missed in the first 2.1.4 patch

Committed in R2_1_maintenance
Comment 10 Alex Boyko CLA 2009-10-15 15:32:33 EDT
Finally complete fix for 2.1 maintenance is there.
Comment 11 Eclipse Webmaster CLA 2010-07-19 12:30:27 EDT
[GMF Restructure] Bug 319140 : product GMF and component Runtime Diagram was the original product and component for this bug