diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/AbortRetryIgnoreHandler.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/AbortRetryIgnoreHandler.java index 43aa08f19..c48e66735 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/AbortRetryIgnoreHandler.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/AbortRetryIgnoreHandler.java @@ -30,6 +30,8 @@ public interface AbortRetryIgnoreHandler { public static int IGNORE = 2; + public static int IGNORE_ALL = 3; + public int handle(Throwable thrown); public AbortRetryIgnoreHandler getNewInstance(); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/ShapeExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/ShapeExporter.java index a8db8a2c0..abd137151 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/ShapeExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/ShapeExporter.java @@ -118,8 +118,8 @@ public class ShapeExporter { case PNG: case BMP: RECT rect = st.getRect(); - int newWidth = (int) (rect.getWidth() * settings.zoom / SWF.unitDivisor); - int newHeight = (int) (rect.getHeight() * settings.zoom / SWF.unitDivisor); + int newWidth = (int) (rect.getWidth() * settings.zoom / SWF.unitDivisor) + 1; + int newHeight = (int) (rect.getHeight() * settings.zoom / SWF.unitDivisor) + 1; SerializableImage img = new SerializableImage(newWidth, newHeight, SerializableImage.TYPE_INT_ARGB); img.fillTransparent(); Matrix m = new Matrix(); diff --git a/src/com/jpexs/decompiler/flash/gui/GuiAbortRetryIgnoreHandler.java b/src/com/jpexs/decompiler/flash/gui/GuiAbortRetryIgnoreHandler.java index de0714c1f..b1f1342e5 100644 --- a/src/com/jpexs/decompiler/flash/gui/GuiAbortRetryIgnoreHandler.java +++ b/src/com/jpexs/decompiler/flash/gui/GuiAbortRetryIgnoreHandler.java @@ -25,11 +25,29 @@ import javax.swing.JOptionPane; */ public class GuiAbortRetryIgnoreHandler implements AbortRetryIgnoreHandler { + private boolean ignoreAll = false; + @Override public int handle(Throwable thrown) { synchronized (GuiAbortRetryIgnoreHandler.class) { - String[] options = new String[]{AppStrings.translate("button.abort"), AppStrings.translate("button.retry"), AppStrings.translate("button.ignore")}; - return View.showOptionDialog(null, AppStrings.translate("error.occured").replace("%error%", thrown.getLocalizedMessage()), AppStrings.translate("error"), JOptionPane.YES_NO_OPTION, JOptionPane.ERROR_MESSAGE, null, options, ""); + String[] options = new String[]{ + AppStrings.translate("button.abort"), + AppStrings.translate("button.retry"), + AppStrings.translate("button.ignore"), + AppStrings.translate("button.ignoreAll") + }; + + if (ignoreAll) { + return AbortRetryIgnoreHandler.IGNORE; + } + + int result = View.showOptionDialog(null, AppStrings.translate("error.occured").replace("%error%", thrown.getLocalizedMessage()), AppStrings.translate("error"), JOptionPane.YES_NO_OPTION, JOptionPane.ERROR_MESSAGE, null, options, ""); + if (result == AbortRetryIgnoreHandler.IGNORE_ALL) { + ignoreAll = true; + result = AbortRetryIgnoreHandler.IGNORE; + } + + return result; } } diff --git a/src/com/jpexs/decompiler/flash/gui/MainPanel.java b/src/com/jpexs/decompiler/flash/gui/MainPanel.java index e5f16f843..62e34b649 100644 --- a/src/com/jpexs/decompiler/flash/gui/MainPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/MainPanel.java @@ -279,8 +279,6 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec private TreePanelMode treePanelMode; - private AbortRetryIgnoreHandler errorHandler = new GuiAbortRetryIgnoreHandler(); - private CancellableWorker setSourceWorker; public TreeItem oldItem; @@ -460,7 +458,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec File ftemp = new File(tempDir); ExportDialog exd = new ExportDialog(null); - files = exportSelection(errorHandler, tempDir, exd); + files = exportSelection(new GuiAbortRetryIgnoreHandler(), tempDir, exd); files.clear(); File[] fs = ftemp.listFiles(); @@ -1576,6 +1574,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec protected Void doInBackground() throws Exception { Helper.freeMem(); try { + AbortRetryIgnoreHandler errorHandler = new GuiAbortRetryIgnoreHandler(); if (compressed) { swf.exportFla(errorHandler, selfile.getAbsolutePath(), new File(swf.getFile()).getName(), ApplicationInfo.APPLICATION_NAME, ApplicationInfo.applicationVerName, ApplicationInfo.version, Configuration.parallelSpeedUp.get(), selectedVersion); } else { @@ -1699,6 +1698,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec @Override public Void doInBackground() throws Exception { try { + AbortRetryIgnoreHandler errorHandler = new GuiAbortRetryIgnoreHandler(); if (onlySel) { exportSelection(errorHandler, selFile, export); } else { diff --git a/src/com/jpexs/decompiler/flash/gui/locales/MainFrame.properties b/src/com/jpexs/decompiler/flash/gui/locales/MainFrame.properties index 5fd7eddc2..3996039bf 100644 --- a/src/com/jpexs/decompiler/flash/gui/locales/MainFrame.properties +++ b/src/com/jpexs/decompiler/flash/gui/locales/MainFrame.properties @@ -574,3 +574,4 @@ text.align.translatex.decrease = Decrease TranslateX text.align.translatex.increase = Increase TranslateX selectPreviousTag = Select previous tag selectNextTag = Select next tag +button.ignoreAll = Ignore All diff --git a/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_hu.properties b/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_hu.properties index 026287175..be670242d 100644 --- a/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_hu.properties +++ b/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_hu.properties @@ -571,3 +571,6 @@ menu.file.export.xml = SWF XML export\u00e1l\u00e1s #after version 4.1.1 text.align.translatex.decrease = TranslateX cs\u00f6kkent\u00e9se text.align.translatex.increase = TranslateX n\u00f6vel\u00e9se +selectPreviousTag = El\u0151z\u0151 tag kiv\u00e1laszt\u00e1sa +selectNextTag = K\u00f6vetkez\u0151 tag kiv\u00e1laszt\u00e1sa +button.ignoreAll = Mell\u0151z mindet \ No newline at end of file