mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-21 21:52:10 +02:00
Bug 540737: Remove false optimization
GC.getForeground / Background always create a new Color object, so this if expression was always true. Change-Id: Ief4ccaf1adb70967301411b012c0474608f425cb
This commit is contained in:
parent
b3e4e60155
commit
fc8ed250b1
1 changed files with 2 additions and 8 deletions
|
@ -157,14 +157,8 @@ public class TextLineRenderer implements ILinelRenderer {
|
|||
}
|
||||
|
||||
private void setupGC(GC gc, Style style) {
|
||||
Color c = fStyleMap.getForegrondColor(style);
|
||||
if (c != gc.getForeground()) {
|
||||
gc.setForeground(c);
|
||||
}
|
||||
c = fStyleMap.getBackgroundColor(style);
|
||||
if (c != gc.getBackground()) {
|
||||
gc.setBackground(c);
|
||||
}
|
||||
gc.setForeground(fStyleMap.getForegrondColor(style));
|
||||
gc.setBackground(fStyleMap.getBackgroundColor(style));
|
||||
Font f = fStyleMap.getFont(style);
|
||||
if (f != gc.getFont()) {
|
||||
gc.setFont(f);
|
||||
|
|
Loading…
Add table
Reference in a new issue