Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,11 @@ public void removeShellListener( ShellListener listener ) {
removeListener( SWT.Activate, listener );
removeListener( SWT.Deactivate, listener );
}

@Override
public void requestLayout () {
layout (null, SWT.DEFER);
}

///////////
// Disposal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import org.eclipse.swt.widgets.Layout;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.forms.events.ExpansionEvent;
import org.eclipse.ui.forms.events.HyperlinkAdapter;
import org.eclipse.ui.forms.events.HyperlinkEvent;
Expand Down Expand Up @@ -880,7 +881,7 @@ protected void internalSetExpanded(boolean expanded) {
getDescriptionControl().setVisible(expanded);
if (client != null)
client.setVisible(expanded);
layout();
reflow();
}
}

Expand Down Expand Up @@ -1117,4 +1118,32 @@ private void programmaticToggleState() {
// if (toggle.isFocusControl())
// gc.drawFocus(0, 0, size.x, size.y);
// }

void reflow() {
Composite c = this;
while (c != null) {
c.setRedraw(false);
c = c.getParent();
if (c instanceof SharedScrolledComposite || c instanceof Shell) {
break;
}
}
c = this;
while (c != null) {
c.requestLayout();
c = c.getParent();
if (c instanceof SharedScrolledComposite) {
((SharedScrolledComposite) c).reflow(true);
break;
}
}
c = this;
while (c != null) {
c.setRedraw(true);
c = c.getParent();
if (c instanceof SharedScrolledComposite || c instanceof Shell) {
break;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -125,31 +125,7 @@ protected void internalSetExpanded(boolean expanded) {
* SharedScrolledComposite is reached.
*/
protected void reflow() {
Composite c = this;
while (c != null) {
c.setRedraw(false);
c = c.getParent();
if (c instanceof SharedScrolledComposite || c instanceof Shell) {
break;
}
}
c = this;
while (c != null) {
c.layout(true);
c = c.getParent();
if (c instanceof SharedScrolledComposite) {
((SharedScrolledComposite) c).reflow(true);
break;
}
}
c = this;
while (c != null) {
c.setRedraw(true);
c = c.getParent();
if (c instanceof SharedScrolledComposite || c instanceof Shell) {
break;
}
}
super.reflow();
}

/**
Expand Down