Skip to content

Commit

Permalink
Avoid redraw animation on StructuredViewer
Browse files Browse the repository at this point in the history
When the a table contains a big amount of entries, selecting
another resolution leads to the typical "animated removal" of all
contained items on Windows, which fully blocks the UI thread due to
redrawing after each item removed.

This animation is internal behavior of the viewers and seems something
which does note help the user due to screen artifacts which are created
and slows down the update process.

See also #909
  • Loading branch information
vogella committed Jul 10, 2023
1 parent 37284cf commit 3fd07d4
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1414,7 +1414,14 @@ void preservingSelection(Runnable updateCode, boolean reveal) {

@Override
public void refresh() {
refresh(getRoot());
Control control = getControl();
control.setRedraw(false);
try {
refresh(getRoot());
} finally {
control.setRedraw(true);
}

}

/**
Expand Down

0 comments on commit 3fd07d4

Please sign in to comment.