Import from file to save on memory

This commit is contained in:
Exund
2022-04-21 16:50:50 +02:00
committed by Jindra Petřík
parent dc8730342b
commit 2586710575
4 changed files with 20 additions and 14 deletions

View File

@@ -2706,9 +2706,8 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
File selectedFile = showImportFileChooser("filter.xml|*.xml", false);
if (selectedFile != null) {
File selfile = Helper.fixDialogFile(selectedFile);
String xml = Helper.readTextFile(selfile.getPath());
try {
new SwfXmlImporter().importSwf(swf, xml);
new SwfXmlImporter().importSwf(swf, selfile);
swf.clearAllCache();
swf.assignExportNamesToSymbols();
swf.assignClassesToSymbols();