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

Bug 469756

Summary: View resize problem when one view is minimized in trimstack
Product: [RT] RAP Reporter: Alexander Gerbig <alexander.gerbig>
Component: IncubatorAssignee: Project Inbox <rap.incubator-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: rsternberg
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 8   
See Also: https://git.eclipse.org/r/54871
https://git.eclipse.org/c/rap/incubator/org.eclipse.rap.incubator.e4.git/commit/?id=c077b2a68f8f418ec60460a3719678e62170d342
Whiteboard:
Attachments:
Description Flags
Patch to org.eclipse.rap.e4.demo
none
Bugfix of SashLayout none

Description Alexander Gerbig CLA 2015-06-09 13:05:28 EDT
Created attachment 254247 [details]
Patch to org.eclipse.rap.e4.demo

If you have a three column partstack layout and you minimize a view on the left (into the trimstack) the size of the right view is calculated wrong when resizing a right view. It is not possible to restore the correct width of the right view when the left one is still in the trimstack.

Attached is a patch to reproduce the bug. The patch adds an empty view to the right of the demo rap e4 application (org.eclipse.rap.e4.demo/Application.e4xmi). 

To reproduce the bug:
1. Open the rap.e4.demo application
2. Minimize the view Emtpy Left
3. Try to change the width of the view Emtpy Right
Comment 1 Alexander Gerbig CLA 2015-06-10 04:14:34 EDT
I analyzed the problem and found it in the class org.eclipse.e4.ui.workbench.renderers.swt.SashLayout. The Listener for Selection on the Sash works on the old SashRect instances and therefor calculates the weights wrong.

I fixed the bug and append it as patch. Maybe it could be used.
Comment 2 Alexander Gerbig CLA 2015-06-10 04:15:51 EDT
Created attachment 254275 [details]
Bugfix of SashLayout
Comment 3 Ivan Furnadjiev CLA 2015-07-23 06:33:44 EDT
The fix looks good to me. Ralf, what do you think?
Comment 4 Ralf Sternberg CLA 2015-07-28 12:49:08 EDT
(In reply to Alexander Gerbig from comment #2)
> Created attachment 254275 [details]
> Bugfix of SashLayout

Thanks for the patch, Alexander! The Eclipse due diligence demands that you sign your CLA [1] before we can accept your contribution. Could you please follow the steps in [2]? Thank you.

[1] https://wiki.eclipse.org/CLA
[2] https://wiki.eclipse.org/Development_Resources/Contributing_via_Git#Eclipse_Foundation_Contributor_License_Agreement
Comment 5 Alexander Gerbig CLA 2015-07-29 04:10:46 EDT
I signed the CLA. Thanks for the hint.
Comment 6 Ralf Sternberg CLA 2015-07-31 04:01:20 EDT
Unfortunately, the patch can not be applied anymore. It seems to be based on an outdated version.

Could you provide the fix as a Gerrit [1] change against master? You can find the Gerrit web UI at [2].

[1] https://wiki.eclipse.org/Development_Resources/Contributing_via_Git#via_Gerrit
[2] https://git.eclipse.org/r/#/q/project:rap/incubator/org.eclipse.rap.incubator.e4
Comment 7 Eclipse Genie CLA 2015-08-31 05:14:41 EDT
New Gerrit change created: https://git.eclipse.org/r/54871
Comment 9 Ralf Sternberg CLA 2015-11-24 04:33:12 EST
The change has been merged.