#958 Remove and Replace character tag of items from CLI

This commit is contained in:
honfika@gmail.com
2015-07-08 21:55:46 +02:00
parent dd5f46cc76
commit 4f35fd8e28
4 changed files with 196 additions and 11 deletions

View File

@@ -2854,6 +2854,20 @@ public final class SWF implements SWFContainerItem, Timelined {
}
}
public void replaceCharacterTags(CharacterTag characterTag, int newCharacterId) {
int characterId = characterTag.getCharacterId();
CharacterTag newCharacter = getCharacter(newCharacterId);
newCharacter.setCharacterId(characterId);
characterTag.setCharacterId(newCharacterId);
newCharacter.setModified(true);
characterTag.setModified(true);
assignExportNamesToSymbols();
assignClassesToSymbols();
clearImageCache();
updateCharacters();
}
@Override
public String toString() {
return getShortFileName();