mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 01:20:56 +00:00
faster imageToShape
This commit is contained in:
@@ -1979,13 +1979,17 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
|
||||
if (swf == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
List<Tag> tags = new ArrayList<>(swf.tags);
|
||||
List<Tag> toRemove = new ArrayList<>();
|
||||
for (Tag tag : tags) {
|
||||
System.out.println(tag.getClass());
|
||||
if (!(tag instanceof ABCContainerTag || tag instanceof ASMSource)) {
|
||||
swf.removeTag(tag, true);
|
||||
toRemove.add(tag);
|
||||
}
|
||||
}
|
||||
|
||||
swf.removeTags(toRemove, true);
|
||||
refreshTree(swf);
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,9 @@ import java.awt.event.MouseEvent;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.swing.JMenu;
|
||||
@@ -519,8 +521,18 @@ public class TagTreeContextMenu extends JPopupMenu implements ActionListener {
|
||||
}
|
||||
|
||||
if (View.showConfirmDialog(this, confirmationMessage, mainPanel.translate("message.confirm"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION) {
|
||||
Map<SWF, List<Tag>> tagsToRemoveBySwf = new HashMap<>();
|
||||
for (Tag tag : tagsToRemove) {
|
||||
tag.getSwf().removeTag(tag, removeDependencies);
|
||||
SWF swf = tag.getSwf();
|
||||
if (!tagsToRemoveBySwf.containsKey(swf)) {
|
||||
tagsToRemoveBySwf.put(swf, new ArrayList<>());
|
||||
}
|
||||
|
||||
tagsToRemoveBySwf.get(swf).add(tag);
|
||||
}
|
||||
|
||||
for (SWF swf : tagsToRemoveBySwf.keySet()) {
|
||||
swf.removeTags(tagsToRemoveBySwf.get(swf), removeDependencies);
|
||||
}
|
||||
|
||||
mainPanel.refreshTree(null);
|
||||
|
||||
Reference in New Issue
Block a user