From c48356fc085b54dd5665eb6af8044ebb0e5601c3 Mon Sep 17 00:00:00 2001 From: "honfika@gmail.com" Date: Sat, 12 Mar 2016 13:58:18 +0100 Subject: [PATCH] set decompiled AS2 script without a worker when it is found in the cache --- .../src/com/jpexs/decompiler/flash/SWF.java | 9 ++++ .../flash/gui/action/ActionPanel.java | 45 +++++++++++++------ 2 files changed, 41 insertions(+), 13 deletions(-) diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java index 65bbbe24b..4425238f9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java @@ -2568,6 +2568,15 @@ public final class SWF implements SWFContainerItem, Timelined { } } + public static CachedScript getFromCache(ASMSource src) { + SWF swf = src.getSwf(); + if (swf.as2Cache.contains(src)) { + return swf.as2Cache.get(src); + } + + return null; + } + public static CachedScript getCached(ASMSource src, ActionList actions) throws InterruptedException { SWF swf = src.getSwf(); if (swf.as2Cache.contains(src)) { diff --git a/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java b/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java index a371ee3e9..1df22266a 100644 --- a/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java @@ -425,36 +425,55 @@ public class ActionPanel extends JPanel implements SearchListener