mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-25 11:25:53 +00:00
Fixed Raw editor does not select item in enum list
This commit is contained in:
@@ -34,6 +34,7 @@ All notable changes to this project will be documented in this file.
|
||||
- Raw editing of DefineFontInfo/DefineFont2-3, KERNINGRECORD - proper switching wide codes
|
||||
- Storing SWF configuration for files inside bundles and/or binarydata
|
||||
- [#1846] blend modes with alpha
|
||||
- Raw editor does not select item in enum list
|
||||
|
||||
### Changed
|
||||
- Full path inside bundle is displayed as SWF name instead simple name
|
||||
|
||||
@@ -90,7 +90,13 @@ public class EnumEditor extends JComboBox<ComboBoxItem<Integer>> implements Gene
|
||||
public void reset() {
|
||||
try {
|
||||
int value = (int) (Integer) ReflectionTools.getValue(obj, field, index);
|
||||
setSelectedItem(values.get(value));
|
||||
for (int i = 0; i < getItemCount(); i++) {
|
||||
ComboBoxItem<Integer> item = getItemAt(i);
|
||||
if (item.getValue() == value) {
|
||||
setSelectedItem(item);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (IllegalArgumentException | IllegalAccessException ex) {
|
||||
// ignore
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user