diff --git a/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java b/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java index 8710c7a58..750f6f6b2 100644 --- a/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java +++ b/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java @@ -135,7 +135,7 @@ public class DecompiledEditorPane extends DebuggableEditorPane implements CaretL } public void setNoTrait() { - abcPanel.detailPanel.showCard(DetailPanel.UNSUPPORTED_TRAIT_CARD, null, 0); + abcPanel.detailPanel.showCard(DetailPanel.UNSUPPORTED_TRAIT_CARD, null, 0, null); } public void hilightSpecial(HighlightSpecialType type, long index) { @@ -224,7 +224,7 @@ public class DecompiledEditorPane extends DebuggableEditorPane implements CaretL trait = null; } } - abcPanel.detailPanel.showCard(DetailPanel.METHOD_GETTER_SETTER_TRAIT_CARD, trait, traitIndex); + abcPanel.detailPanel.showCard(DetailPanel.METHOD_GETTER_SETTER_TRAIT_CARD, trait, traitIndex, abc); MethodCodePanel methodCodePanel = abcPanel.detailPanel.methodTraitPanel.methodCodePanel; if (reset || (methodCodePanel.getBodyIndex() != bi)) { methodCodePanel.setBodyIndex(scriptName, bi, abc, name, trait, script.scriptIndex); @@ -658,7 +658,7 @@ public class DecompiledEditorPane extends DebuggableEditorPane implements CaretL final Trait ftrait = currentTrait; final int ftraitIndex = lastTraitIndex; View.execInEventDispatch(() -> { - abcPanel.detailPanel.showCard(DetailPanel.SLOT_CONST_TRAIT_CARD, ftrait, ftraitIndex); + abcPanel.detailPanel.showCard(DetailPanel.SLOT_CONST_TRAIT_CARD, ftrait, ftraitIndex, abc); }); abcPanel.detailPanel.setEditMode(false); currentMethodHighlight = null; diff --git a/src/com/jpexs/decompiler/flash/gui/abc/DetailPanel.java b/src/com/jpexs/decompiler/flash/gui/abc/DetailPanel.java index 91f3d764c..50d9e2c64 100644 --- a/src/com/jpexs/decompiler/flash/gui/abc/DetailPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/abc/DetailPanel.java @@ -16,6 +16,7 @@ */ package com.jpexs.decompiler.flash.gui.abc; +import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.abc.types.Multiname; import com.jpexs.decompiler.flash.abc.types.traits.Trait; import com.jpexs.decompiler.flash.configuration.Configuration; @@ -194,7 +195,7 @@ public class DetailPanel extends JPanel implements TagEditorPanel { selectedLabel.setIcon(val ? View.getIcon("editing16") : null); } - public void showCard(final String name, final Trait trait, int traitIndex) { + public void showCard(final String name, final Trait trait, int traitIndex, ABC abc) { View.execInEventDispatch(() -> { CardLayout layout = (CardLayout) innerPanel.getLayout(); layout.show(innerPanel, name); @@ -286,8 +287,8 @@ public class DetailPanel extends JPanel implements TagEditorPanel { if (trait == null) { traitNameLabel.setText("-"); } else if (abcPanel != null) { - Multiname traitName = trait.getName(abcPanel.abc); - String traitNameStr = traitName == null ? "" : traitName.getName(abcPanel.abc.constants, null, false, true); + Multiname traitName = trait.getName(abc); + String traitNameStr = traitName == null ? "" : traitName.getName(abc.constants, null, false, true); traitNameLabel.setText(traitNameStr); } });