mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
ui: don't change combobox text in table while evaluating 'getPreferredSize' (IDEA-210798)
GitOrigin-RevId: d0c1a93b3d12758fabbd6fa8709915183e95987f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
cf77e8a06f
commit
63e164babb
@@ -54,6 +54,8 @@ public class ComboBoxTableRenderer<T> extends JLabel implements TableCellRendere
|
||||
Dimension size = addIconSize(super.getPreferredSize());
|
||||
|
||||
if (myValues != null) {
|
||||
String oldText = getText();
|
||||
Icon oldIcon = getIcon();
|
||||
for(T v : myValues) {
|
||||
setText(getTextFor(v));
|
||||
setIcon(getIconFor(v));
|
||||
@@ -63,6 +65,8 @@ public class ComboBoxTableRenderer<T> extends JLabel implements TableCellRendere
|
||||
size.width = Math.max(size.width, vSize.width);
|
||||
size.height = Math.max(size.height, vSize.height);
|
||||
}
|
||||
setText(oldText);
|
||||
setIcon(oldIcon);
|
||||
}
|
||||
|
||||
return size;
|
||||
|
||||
Reference in New Issue
Block a user