Fixed Clearing shape export cache on changes

This commit is contained in:
Jindra Petřík
2022-11-14 23:09:43 +01:00
parent 61c5e6b5da
commit 03f1866f92
5 changed files with 20 additions and 0 deletions

View File

@@ -3616,6 +3616,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
setTagTreeSelectedNode(getCurrentTree(), newTag);
}
swf.clearImageCache();
swf.clearShapeCache();
} catch (IOException ex) {
logger.log(Level.SEVERE, "Invalid image", ex);
ViewMessages.showMessageDialog(this, translate("error.image.invalid"), translate("error"), JOptionPane.ERROR_MESSAGE);
@@ -3644,6 +3645,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
}
swf.clearImageCache();
swf.clearShapeCache();
} catch (IOException ex) {
logger.log(Level.SEVERE, "Invalid image", ex);
ViewMessages.showMessageDialog(MainPanel.this, translate("error.image.invalid"), translate("error"), JOptionPane.ERROR_MESSAGE);
@@ -3699,6 +3701,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
}
swf.clearImageCache();
swf.clearShapeCache();
} catch (IOException ex) {
logger.log(Level.SEVERE, "Invalid image", ex);
ViewMessages.showMessageDialog(this, translate("error.image.invalid"), translate("error"), JOptionPane.ERROR_MESSAGE);
@@ -3729,6 +3732,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
new ImageImporter().importImageAlpha(it, data);
SWF swf = it.getSwf();
swf.clearImageCache();
swf.clearShapeCache();
} catch (IOException ex) {
logger.log(Level.SEVERE, "Invalid alpha channel data", ex);
ViewMessages.showMessageDialog(this, translate("error.image.alpha.invalid"), translate("error"), JOptionPane.ERROR_MESSAGE);