Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 459093

Summary: Undo does not seem to properly work if performing two zoom operations successively.
Product: [Tools] GEF Reporter: Alexander Nyßen <nyssen>
Component: GEF ZestAssignee: Alexander Nyßen <nyssen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 3.10.0 (Mars) M6   
Hardware: All   
OS: All   
Whiteboard:

Description Alexander Nyßen CLA 2015-02-04 00:53:15 EST
If applying to zoom operations after another, only the first seems to be undoable.
Comment 1 Alexander Nyßen CLA 2015-02-05 12:47:56 EST
This is a Zest.FX specific problem. 

The cause for it is that SynchronizeChildrenOnZoomBehavior registers a listener on the viewport, and as a result to a viewport change executes a sync operation (on each viewport change) via the domain's undo history. 

We should to replace this behavior with a specific FXZoomPolicy that makes sure the SynchronizeContentChildrenOperation is executed in a composite command with the FXChangeViewPortOperation (that is created by FXZoomPolicy).
Comment 2 Alexander Nyßen CLA 2015-02-07 06:35:31 EST
Changed that the synchronize children operation within SynchronizeChildrenOnZoomBehavior is not executed via the operation history, but only locally. This fixes the problem, as the operation does not affect the undo history any more (and via the listener, each viewport change will lead to a synchronization.

It also seems to be the better fix, as within the zoom policy, we would have to process all child content parts and synchronize their respective children, while within the behavior, only those content parts that actually need to synchronize their children can perform the synchronization.

Resolving as fixed in 3.10.0M6.