Bug 525939 - SashRenderer does not forceLayout when child element container data has changed
Summary: SashRenderer does not forceLayout when child element container data has changed
Status: CLOSED DUPLICATE of bug 553811
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.8   Edit
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-12 09:55 EDT by Julian Hemm CLA
Modified: 2019-12-17 14:16 EST (History)
2 users (show)

See Also:


Attachments
SashRenderer.java (7.18 KB, application/octet-stream)
2017-10-13 11:23 EDT, Julian Hemm CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Hemm CLA 2017-10-12 09:55:36 EDT
When a MPartStack is resized using setContainerData, the parent MPartSashContainer does not redraw because forceLayout is not being invoked.

How to reproduce:

ApplicationModel:
-PartSashContainer 
--PartStack
--PartStack

Load PartSashContainer and child PartStacks via modelService and set a different containerData to PartStacks:
Expected behavior: PartStashContainer is adjusted
Actual result: Nothing happens

The problem is that SashRenderer.subscribeTopicSashWeightChanged() returns when element.getRenderer() != SashRenderer.this

Workaround:
call MPartSashContainer.setContainerData(newValue) to trigger change
Comment 1 Lars Vogel CLA 2017-10-12 10:16:08 EDT
Thanks Julian, are you available to upload a Gerrit? 

IMHO fix would look similar to:

if !(element.getParent!=null && element.getParent!= SashRenderer.this ) || element.getRenderer() == SashRenderer.this {
 return;
}

We basically need to check the parent also and see if it is a SashRenderer.
Comment 2 Julian Hemm CLA 2017-10-13 11:23:32 EDT
Created attachment 270993 [details]
SashRenderer.java

Hi,

i tried to fix the SashRenderer.
Unfortunately I have problems pushing to Gerrit and no time to fix it.

So, for review I will attach my changes here :/

I'm not pretty sure with the changes, looks quite complicated what was needed to be done so please take a look at it.

- added 3 private methods on the buttom and adapted forceLayout and subscribeTopicSashWeightChanged

Hope this helps.

regards
Julian
Comment 3 Dani Megert CLA 2017-12-05 12:10:10 EST
This bug did not get delivered for the specified target milestone. Please set the target milestone when you plan to deliver the fix.
Comment 4 Lars Vogel CLA 2019-12-17 14:16:46 EST
Sorry Julian for missing your patch. I regulary check Gerrit but didn't see that you had issue uploading a patch to Gerrit. Meanwhile we have fixed that via Bug 553811

*** This bug has been marked as a duplicate of bug 553811 ***