mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-27 22:55:35 +00:00
Removing BUTTONCONDACTION, CLIPACTIONRECORD.
Updating messagebox about removing - it is different for "remove with dependencies" and simple "remove". Languages manually updated.
This commit is contained in:
@@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
|
||||
- #1155, #1602 AS3 remove trait button
|
||||
- #1260, #1438 AS1/2 direct editing on(xxx), onClipEvent(xxx) handlers
|
||||
- #1366, #1409, #1429, #1573, #1598 AS1/2/3 Add script/class (context menu on scripts folder)
|
||||
- Removing BUTTONCONDACTION, CLIPACTIONRECORD
|
||||
|
||||
### Fixed
|
||||
- #1298 AS1/2 properly decompiled setProperty/getProperty
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
@@ -456,4 +457,14 @@ public class PlaceObject2Tag extends PlaceObjectTypeTag implements ASMSourceCont
|
||||
public Integer getVisible() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setClipActions(CLIPACTIONS clipActions) {
|
||||
this.clipActions = clipActions;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPlaceFlagHasClipActions(boolean placeFlagHasClipActions) {
|
||||
this.placeFlagHasClipActions = placeFlagHasClipActions;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.EndOfStreamException;
|
||||
@@ -641,4 +642,14 @@ public class PlaceObject3Tag extends PlaceObjectTypeTag implements ASMSourceCont
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setClipActions(CLIPACTIONS clipActions) {
|
||||
this.clipActions = clipActions;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPlaceFlagHasClipActions(boolean placeFlagHasClipActions) {
|
||||
this.placeFlagHasClipActions = placeFlagHasClipActions;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.EndOfStreamException;
|
||||
@@ -662,4 +663,14 @@ public class PlaceObject4Tag extends PlaceObjectTypeTag implements ASMSourceCont
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setClipActions(CLIPACTIONS clipActions) {
|
||||
this.clipActions = clipActions;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPlaceFlagHasClipActions(boolean placeFlagHasClipActions) {
|
||||
this.placeFlagHasClipActions = placeFlagHasClipActions;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
@@ -270,4 +271,14 @@ public class PlaceObjectTag extends PlaceObjectTypeTag {
|
||||
public Integer getVisible() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setClipActions(CLIPACTIONS clipActions) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPlaceFlagHasClipActions(boolean placeFlagHasClipActions) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags.base;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
@@ -82,6 +83,10 @@ public abstract class PlaceObjectTypeTag extends Tag implements CharacterIdTag {
|
||||
|
||||
public abstract Amf3Value getAmfData();
|
||||
|
||||
public abstract void setClipActions(CLIPACTIONS clipActions);
|
||||
|
||||
public abstract void setPlaceFlagHasClipActions(boolean placeFlagHasClipActions);
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
String result = super.getName();
|
||||
|
||||
@@ -785,4 +785,10 @@ message.confirm.removetrait = Do you really want to remove selected trait?
|
||||
|
||||
contextmenu.addScript = Add script
|
||||
|
||||
contextmenu.addClass = Add class
|
||||
contextmenu.addClass = Add class
|
||||
|
||||
contextmenu.removeScript = Remove script
|
||||
|
||||
message.confirm.remove.nodep = Are you sure you want to remove %item%?
|
||||
|
||||
message.confirm.removemultiple.nodep = Are you sure you want to remove %count% items?
|
||||
|
||||
@@ -772,3 +772,9 @@ message.font.setadvancevalues = Aquesta operaci\u00f3 establir\u00e0 l'aven\u00e
|
||||
menu.tools.deobfuscation.renameColliding = Reanomena els trets/classes que col\u00b7lisionen
|
||||
|
||||
filter.iggy = Fitxers Iggy (*.iggy)
|
||||
|
||||
|
||||
#...
|
||||
message.confirm.remove.nodep = Segur que vols eliminar %item%?
|
||||
|
||||
message.confirm.removemultiple.nodep = Segur que vols eliminar %count% elements?
|
||||
|
||||
@@ -763,4 +763,8 @@ message.confirm.removetrait = Opravdu chcete odstranit vybranou vlastnost?
|
||||
|
||||
contextmenu.addScript = P\u0159idat skript
|
||||
|
||||
contextmenu.addClass = P\u0159idat t\u0159\u00eddu
|
||||
contextmenu.addClass = P\u0159idat t\u0159\u00eddu
|
||||
|
||||
message.confirm.remove.nodep = Opravdu chcete odebrat %item%?
|
||||
|
||||
message.confirm.removemultiple.nodep = Opravdu chcete odebrat %count% polo\u017eek?
|
||||
|
||||
@@ -622,3 +622,8 @@ import.script.as12warning = Import kann nur AS1/2 Skripte importieren.
|
||||
|
||||
error.constantPoolTooBig = Konstantenpool ist zu gross. index=%index%, Gr\u00f6sse=%size%
|
||||
error.image.alpha.invalid = Ung\u00fcltige Alphakanaldaten.
|
||||
|
||||
#...
|
||||
message.confirm.remove.nodep = Wolen Sie wirklich %item% entfernen?
|
||||
|
||||
message.confirm.removemultiple.nodep = Wollen sie wirklich %count% Elemente entfernen?
|
||||
@@ -716,3 +716,8 @@ export.script.singleFilePallelModeWarning = La exportaci\u00f3n de escritura de
|
||||
|
||||
button.showOriginalBytesInPcodeHex = Mostrar bytes originales
|
||||
button.remove = Remover
|
||||
|
||||
#...
|
||||
message.confirm.remove.nodep = Est\u00e1 seguro que desea remover %item%?
|
||||
|
||||
message.confirm.removemultiple.nodep = Est\u00e1 seguro que desea eliminar %count% art\u00edculos?
|
||||
|
||||
@@ -732,4 +732,10 @@ generic.editor.amf3.help = Syntaxe de la valeur AMF3 :\n\
|
||||
\ * les types de donn\u00e9es non scalaires peuvent faire r\u00e9f\u00e9rence \u00e0 des "id" pr\u00e9c\u00e9demment d\u00e9clar\u00e9s avec les attributs # syntaxe :\n\
|
||||
%reference_sample%\n\
|
||||
\ * les entr\u00e9es du dictionnaire peuvent \u00eatre de tous types\n
|
||||
contextmenu.showInResources = Afficher dans les resources
|
||||
contextmenu.showInResources = Afficher dans les resources
|
||||
|
||||
|
||||
#...
|
||||
message.confirm.remove.nodep = \u00cates-vous s\u00fbr de vouloir retirer les objets %item% ?
|
||||
|
||||
message.confirm.removemultiple.nodep = \u00cates-vous s\u00fbr de vouloir retirer %count% objets ?
|
||||
|
||||
@@ -712,3 +712,9 @@ message.warning.outOfMemory32BitJre = Elfogyott a mem\u00f3ria. 32bites Java-t f
|
||||
menu.file.reloadAll = Minden \u00fajrat\u00f6lt\u00e9se
|
||||
message.confirm.reloadAll = Ez a m\u0171velet visszavonja az \u00f6sszes nem mentett v\u00e1ltoz\u00e1st az \u00f6sszes SWF f\u00e1jlban \u00e9s \u00fajrat\u00f6lti a teljes alkalmaz\u00e1st.\nSzeretn\u00e9 folytatni?
|
||||
export.script.singleFilePallelModeWarning = Az egy f\u00e1jlba t\u00f6rt\u00e9n\u0151 szkript export\u00e1l\u00e1s nem t\u00e1mogatott bekapcsolt p\u00e1rhuzamos gyors\u00edt\u00e1ssal
|
||||
|
||||
#...
|
||||
message.confirm.remove.nodep = Biztos benne, hogy t\u00f6r\u00f6lni k\u00edv\u00e1nja a %item%-t ?
|
||||
|
||||
message.confirm.removemultiple.nodep = Biztos benne, hogy t\u00f6r\u00f6lni k\u00edv\u00e1nja a %count% elemet ?
|
||||
|
||||
|
||||
@@ -716,3 +716,8 @@ export.script.singleFilePallelModeWarning = L'esportazione di script su singolo
|
||||
|
||||
button.showOriginalBytesInPcodeHex = Mostra byte originali
|
||||
button.remove = Rimuovi
|
||||
|
||||
#...
|
||||
message.confirm.remove.nodep = Sicuro di voler remuovere %item%?
|
||||
|
||||
message.confirm.removemultiple.nodep = Confermare la rimozione di %count% elementi?
|
||||
|
||||
@@ -416,3 +416,8 @@ node.others = anderen
|
||||
|
||||
#after version 1.8.1
|
||||
menu.tools.search = Tekst zoeken
|
||||
|
||||
#...
|
||||
message.confirm.remove.nodep = Weet U zeker dat U %item% verwijderen?
|
||||
|
||||
message.confirm.removemultiple.nodep = Weet U zeker dat U %count% items verwijderen?
|
||||
|
||||
@@ -521,3 +521,8 @@ button.snapshot.hint = Wykonaj zrzut do schowka
|
||||
|
||||
#Font name which is presented in the SWF Font tag
|
||||
font.name.intag = Nazwa czcionki w etykiecie:
|
||||
|
||||
#...
|
||||
message.confirm.remove.nodep = Czy na pewno chcesz usun\u0105\u0107 %item%?
|
||||
|
||||
message.confirm.removemultiple.nodep = Czy na pewno chcesz usun\u0105\u0107 %count% obiekt\u00f3w(y)?
|
||||
|
||||
@@ -346,3 +346,6 @@ ColorChooser.previewText = Visualizar
|
||||
ColorChooser.swatchesNameText = Swatches
|
||||
ColorChooser.swatchesRecentText = Recente:
|
||||
ColorChooser.sampleText = Amostra de Texto Amostra de Texto
|
||||
|
||||
#...
|
||||
message.confirm.remove.nodep = Tem a certeza que pretende remover %item%?
|
||||
|
||||
@@ -346,3 +346,6 @@ ColorChooser.previewText = Visualizar
|
||||
ColorChooser.swatchesNameText = Swatches
|
||||
ColorChooser.swatchesRecentText = Recente:
|
||||
ColorChooser.sampleText = Amostra de Texto Amostra de Texto
|
||||
|
||||
#...
|
||||
message.confirm.remove.nodep = Tem a certeza que pretende remover %item%?
|
||||
|
||||
@@ -573,3 +573,8 @@ selectPreviousTag = \u0412\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u043
|
||||
selectNextTag = \u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0442\u044d\u0433
|
||||
button.ignoreAll = \u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435
|
||||
menu.file.import.symbolClass = \u041a\u043b\u0430\u0441\u0441 \u0441\u0438\u043c\u0432\u043e\u043b\u0430
|
||||
|
||||
#...
|
||||
message.confirm.remove.nodep = \u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 %item%?
|
||||
|
||||
message.confirm.removemultiple.nodep = \u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435: %count%?
|
||||
|
||||
@@ -614,3 +614,8 @@ filter.linuxExe = Linux K\u00f6rbara filer
|
||||
|
||||
import.script.result = %count% skript har blivit importerade.
|
||||
import.script.as12warning = Importera skript kan bara importera AS1/2 skript
|
||||
|
||||
#...
|
||||
message.confirm.remove.nodep = \u00c4r du s\u00e4ker p\u00e5 att du vill ta bort %item%?
|
||||
|
||||
message.confirm.removemultiple.nodep = \u00c4r du s\u00e4ker p\u00e5 att du vill ta bort %count% objekt?
|
||||
|
||||
@@ -1255,3 +1255,8 @@ filter.iggy = Iggy dosyalar\u0131 (*.iggy)
|
||||
|
||||
|
||||
script.seemsBroken = <b>UYARI</b>: Kod ayr\u0131\u015ft\u0131rmas\u0131n\u0131 i\u00e7erir <font color=red>\u00a7\u00a7 talimatlar</font>. \
|
||||
|
||||
#...
|
||||
message.confirm.remove.nodep = %item%\n kald\u0131rmak istedi\u011finizden emin misiniz?
|
||||
|
||||
message.confirm.removemultiple.nodep = %count% items\n kald\u0131rmak istedi\u011finizden emin misiniz?
|
||||
|
||||
@@ -416,3 +416,8 @@ node.others = \u0406\u043d\u0448\u0456
|
||||
|
||||
#after version 1.8.1
|
||||
menu.tools.search = \u041f\u043e\u0448\u0443\u043a \u0442\u0435\u043a\u0441\u0442\u0443
|
||||
|
||||
#...
|
||||
message.confirm.remove.nodep = \u0412\u0438 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u0456, \u0449\u043e \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0432\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u0435\u043b\u0435\u043c\u0435\u043d\u0442 %item%?
|
||||
|
||||
message.confirm.removemultiple.nodep = \u0412\u0438 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u0456, \u0449\u043e \u0445\u043e\u0447\u0435\u0442\u0435 \u0432\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0438 \u0443 \u043a\u0456\u043b\u044c\u043a\u043e\u0441\u0442\u0456: %count%?
|
||||
|
||||
@@ -777,3 +777,8 @@ filter.iggy = Iggy\u6587\u4ef6(*.iggy)
|
||||
script.seemsBroken = <b>\u8b66\u544a</b>: \u4ee3\u7801\u53cd\u6c47\u7f16\u5305\u542b<font color=red>\u00a7\u00a7\u6307\u4ee4</font>. \
|
||||
\u8fd9\u901a\u5e38\u662f\u7531\u4e8e\u6df7\u6dc6\u9020\u6210\u7684(\u8bf7\u53c2\u9605"\u8bbe\u7f6e/\u81ea\u52a8\u53cd\u6df7\u6dc6")\
|
||||
\u6216\u811a\u672c\u662f\u7531\u975e\u6807\u51c6\u7684\u7f16\u8bd1\u5668\u751f\u6210\u7684(\u5982Haxe\u7b49)\u3002 \
|
||||
|
||||
#...
|
||||
message.confirm.remove.nodep = \u60a8\u786e\u5b9a\u8981\u5220\u9664%item%\uff1f
|
||||
|
||||
message.confirm.removemultiple.nodep = \u60a8\u786e\u5b9a\u8981\u5220\u9664%count%\u4e2a\u9879\u76ee\uff1f
|
||||
@@ -90,6 +90,7 @@ import javax.swing.JOptionPane;
|
||||
import javax.swing.JPopupMenu;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.tree.TreePath;
|
||||
import javax.swing.tree.TreeSelectionModel;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -142,6 +143,7 @@ public class TagTreeContextMenu extends JPopupMenu {
|
||||
private JMenuItem openSWFInsideTagMenuItem;
|
||||
|
||||
private JMenuItem addAs12ScriptMenuItem;
|
||||
|
||||
private JMenuItem addAs3ClassMenuItem;
|
||||
|
||||
public TagTreeContextMenu(final TagTree tagTree, MainPanel mainPanel) {
|
||||
@@ -269,18 +271,29 @@ public class TagTreeContextMenu extends JPopupMenu {
|
||||
|
||||
final List<SWFList> swfs = mainPanel.getSwfs();
|
||||
|
||||
boolean allSelectedIsTagOrFrame = true;
|
||||
boolean canRemove = true;
|
||||
boolean onlyClipActionButtonCond = true;
|
||||
for (TreeItem item : items) {
|
||||
if (!(item instanceof Tag) && !(item instanceof Frame)) {
|
||||
if (item instanceof TagScript) {
|
||||
Tag tag = ((TagScript) item).getTag();
|
||||
if (tag instanceof DoActionTag || tag instanceof DoInitActionTag) {
|
||||
onlyClipActionButtonCond = false;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
allSelectedIsTagOrFrame = false;
|
||||
if (item instanceof CLIPACTIONRECORD) {
|
||||
continue;
|
||||
}
|
||||
if (item instanceof BUTTONCONDACTION) {
|
||||
continue;
|
||||
}
|
||||
|
||||
canRemove = false;
|
||||
break;
|
||||
} else {
|
||||
onlyClipActionButtonCond = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -337,8 +350,8 @@ public class TagTreeContextMenu extends JPopupMenu {
|
||||
}
|
||||
|
||||
expandRecursiveMenuItem.setVisible(false);
|
||||
removeMenuItem.setVisible(allSelectedIsTagOrFrame);
|
||||
removeWithDependenciesMenuItem.setVisible(allSelectedIsTagOrFrame);
|
||||
removeMenuItem.setVisible(canRemove);
|
||||
removeWithDependenciesMenuItem.setVisible(canRemove && !onlyClipActionButtonCond);
|
||||
undoTagMenuItem.setVisible(allSelectedIsTag);
|
||||
exportSelectionMenuItem.setEnabled(tagTree.hasExportableNodes());
|
||||
replaceMenuItem.setVisible(false);
|
||||
@@ -1238,10 +1251,18 @@ public class TagTreeContextMenu extends JPopupMenu {
|
||||
}
|
||||
|
||||
private void removeItemActionPerformed(ActionEvent evt, boolean removeDependencies) {
|
||||
List<TreeItem> sel = tagTree.getSelected();
|
||||
|
||||
TreePath[] tps = tagTree.getSelectionModel().getSelectionPaths();
|
||||
if (tps == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
List<Tag> tagsToRemove = new ArrayList<>();
|
||||
for (TreeItem item : sel) {
|
||||
List<Object> itemsToRemove = new ArrayList<>();
|
||||
List<Object> itemsToRemoveParents = new ArrayList<>();
|
||||
List<Object> itemsToRemoveSprites = new ArrayList<>();
|
||||
for (TreePath path : tps) {
|
||||
TreeItem item = (TreeItem) path.getLastPathComponent();
|
||||
if (item instanceof Tag) {
|
||||
tagsToRemove.add((Tag) item);
|
||||
} else if (item instanceof TagScript) {
|
||||
@@ -1255,20 +1276,67 @@ public class TagTreeContextMenu extends JPopupMenu {
|
||||
// this should be the last frame, so remove the inner tags
|
||||
tagsToRemove.addAll(frame.innerTags);
|
||||
}
|
||||
} else if (item instanceof BUTTONCONDACTION) {
|
||||
itemsToRemove.add(item);
|
||||
itemsToRemoveParents.add(((TagScript) path.getParentPath().getLastPathComponent()).getTag());
|
||||
itemsToRemoveSprites.add(new Object());
|
||||
} else if (item instanceof CLIPACTIONRECORD) {
|
||||
itemsToRemove.add(item);
|
||||
Object sprite = path.getParentPath().getParentPath().getParentPath().getLastPathComponent();
|
||||
if (sprite instanceof TagScript) {
|
||||
sprite = ((TagScript) sprite).getTag();
|
||||
}
|
||||
itemsToRemoveParents.add(((TagScript) path.getParentPath().getLastPathComponent()).getTag());
|
||||
itemsToRemoveSprites.add(sprite);
|
||||
}
|
||||
}
|
||||
|
||||
if (tagsToRemove.size() > 0) {
|
||||
if (tagsToRemove.size() > 0 || itemsToRemove.size() > 0) {
|
||||
String confirmationMessage;
|
||||
if (tagsToRemove.size() == 1) {
|
||||
Tag tag = tagsToRemove.get(0);
|
||||
confirmationMessage = mainPanel.translate("message.confirm.remove").replace("%item%", tag.toString());
|
||||
if (tagsToRemove.size() + itemsToRemove.size() == 1) {
|
||||
Object toRemove;
|
||||
if (tagsToRemove.size() == 1) {
|
||||
toRemove = tagsToRemove.get(0);
|
||||
} else {
|
||||
toRemove = itemsToRemove.get(0);
|
||||
}
|
||||
confirmationMessage = mainPanel.translate("message.confirm.remove" + (removeDependencies ? "" : ".nodep")).replace("%item%", toRemove.toString());
|
||||
} else {
|
||||
confirmationMessage = mainPanel.translate("message.confirm.removemultiple").replace("%count%", Integer.toString(tagsToRemove.size()));
|
||||
confirmationMessage = mainPanel.translate("message.confirm.removemultiple" + (removeDependencies ? "" : ".nodep")).replace("%count%", Integer.toString(tagsToRemove.size()));
|
||||
}
|
||||
|
||||
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 (int i = 0; i < itemsToRemove.size(); i++) {
|
||||
Object item = itemsToRemove.get(i);
|
||||
Object parent = itemsToRemoveParents.get(i);
|
||||
if (item instanceof BUTTONCONDACTION) {
|
||||
DefineButton2Tag button = (DefineButton2Tag) parent;
|
||||
BUTTONCONDACTION buttonCondAction = (BUTTONCONDACTION) item;
|
||||
button.actions.remove(buttonCondAction);
|
||||
if (buttonCondAction.isLast) {
|
||||
if (!button.actions.isEmpty()) {
|
||||
button.actions.get(button.actions.size() - 1).isLast = true;
|
||||
}
|
||||
}
|
||||
button.setModified(true);
|
||||
}
|
||||
if (item instanceof CLIPACTIONRECORD) {
|
||||
PlaceObjectTypeTag place = (PlaceObjectTypeTag) parent;
|
||||
Timelined tim = (itemsToRemoveSprites.get(i) instanceof DefineSpriteTag) ? (DefineSpriteTag) itemsToRemoveSprites.get(i) : place.getSwf();
|
||||
|
||||
CLIPACTIONRECORD clipActionRecord = (CLIPACTIONRECORD) item;
|
||||
CLIPACTIONS clipActions = place.getClipActions();
|
||||
clipActions.clipActionRecords.remove(clipActionRecord);
|
||||
if (clipActions.clipActionRecords.isEmpty()) {
|
||||
place.setPlaceFlagHasClipActions(false);
|
||||
place.setClipActions(null);
|
||||
}
|
||||
clipActions.calculateAllEventFlags();
|
||||
place.setModified(true);
|
||||
tim.resetTimeline();
|
||||
}
|
||||
}
|
||||
for (Tag tag : tagsToRemove) {
|
||||
SWF swf = tag.getSwf();
|
||||
if (!tagsToRemoveBySwf.containsKey(swf)) {
|
||||
|
||||
Reference in New Issue
Block a user