mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 19:00:47 +00:00
ASM panel is empty after switching caching mode: fixed (selected methodbody was not cleared, but the text was cleared => no refresh)
This commit is contained in:
@@ -3097,7 +3097,7 @@ public final class MainFrame extends AppRibbonFrame implements ActionListener, T
|
||||
break;
|
||||
}
|
||||
}
|
||||
abcPanel.detailPanel.methodTraitPanel.methodCodePanel.setCode("");
|
||||
abcPanel.detailPanel.methodTraitPanel.methodCodePanel.clear();
|
||||
abcPanel.navigator.setABC(abcList, scriptLeaf.abc);
|
||||
abcPanel.navigator.setClassIndex(classIndex, scriptLeaf.scriptIndex);
|
||||
abcPanel.setAbc(scriptLeaf.abc);
|
||||
|
||||
@@ -525,7 +525,7 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Fr
|
||||
switchAbc(listIndex);
|
||||
decompiledTextArea.clearScriptCache();
|
||||
decompiledTextArea.reloadClass();
|
||||
detailPanel.methodTraitPanel.methodCodePanel.setBodyIndex(-1, abc, decompiledTextArea.getCurrentTrait());
|
||||
detailPanel.methodTraitPanel.methodCodePanel.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -246,6 +246,12 @@ public class ASMSourceEditorPane extends LineMarkedEditorPane implements CaretLi
|
||||
setCaretPosition(0);
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
setText("");
|
||||
bodyIndex = -1;
|
||||
setCaretPosition(0);
|
||||
}
|
||||
|
||||
public void selectInstruction(int pos) {
|
||||
String text = getText();
|
||||
int lineCnt = 1;
|
||||
|
||||
@@ -143,7 +143,7 @@ public final class ClassesListTree extends JTree implements TreeSelectionListene
|
||||
abcPanel.decompiledTextArea.setScript(scriptLeaf, abcList);
|
||||
abcPanel.decompiledTextArea.setClassIndex(classIndex);
|
||||
abcPanel.decompiledTextArea.setNoTrait();
|
||||
abcPanel.detailPanel.methodTraitPanel.methodCodePanel.setCode("");
|
||||
abcPanel.detailPanel.methodTraitPanel.methodCodePanel.clear();
|
||||
Main.stopWork();
|
||||
}
|
||||
}).start();
|
||||
|
||||
@@ -78,8 +78,8 @@ public class MethodCodePanel extends JPanel implements ActionListener {
|
||||
return sourceTextArea.bodyIndex;
|
||||
}
|
||||
|
||||
public void setCode(String text) {
|
||||
sourceTextArea.setText(text);
|
||||
public void clear() {
|
||||
sourceTextArea.clear();
|
||||
}
|
||||
|
||||
public boolean save(ConstantPool constants) {
|
||||
|
||||
Reference in New Issue
Block a user