mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-18 08:11:52 +00:00
restore modified state even when something goes wrong
This commit is contained in:
@@ -29,7 +29,6 @@ import com.jpexs.decompiler.flash.types.ColorTransform;
|
||||
import com.jpexs.decompiler.flash.types.MATRIX;
|
||||
import com.jpexs.decompiler.flash.types.RGBA;
|
||||
import com.jpexs.decompiler.flash.types.annotations.Conditional;
|
||||
import com.jpexs.decompiler.flash.types.annotations.HideInRawEdit;
|
||||
import com.jpexs.decompiler.flash.types.annotations.SWFType;
|
||||
import com.jpexs.decompiler.flash.types.filters.FILTER;
|
||||
import com.jpexs.helpers.ByteArrayRange;
|
||||
@@ -418,7 +417,12 @@ public class PlaceObject2Tag extends PlaceObjectTypeTag implements ASMSourceCont
|
||||
matrix = m;
|
||||
boolean mod = isModified();
|
||||
setModified(true);
|
||||
super.writeTag(sos);
|
||||
try {
|
||||
super.writeTag(sos);
|
||||
} finally {
|
||||
setModified(mod);
|
||||
}
|
||||
|
||||
setModified(mod);
|
||||
matrix = old;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@ import com.jpexs.decompiler.flash.types.ColorTransform;
|
||||
import com.jpexs.decompiler.flash.types.MATRIX;
|
||||
import com.jpexs.decompiler.flash.types.RGBA;
|
||||
import com.jpexs.decompiler.flash.types.annotations.Conditional;
|
||||
import com.jpexs.decompiler.flash.types.annotations.HideInRawEdit;
|
||||
import com.jpexs.decompiler.flash.types.annotations.Internal;
|
||||
import com.jpexs.decompiler.flash.types.annotations.Reserved;
|
||||
import com.jpexs.decompiler.flash.types.annotations.SWFArray;
|
||||
@@ -565,7 +564,12 @@ public class PlaceObject3Tag extends PlaceObjectTypeTag implements ASMSourceCont
|
||||
matrix = m;
|
||||
boolean mod = isModified();
|
||||
setModified(true);
|
||||
super.writeTag(sos);
|
||||
try {
|
||||
super.writeTag(sos);
|
||||
} finally {
|
||||
setModified(mod);
|
||||
}
|
||||
|
||||
setModified(mod);
|
||||
matrix = old;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@ import com.jpexs.decompiler.flash.types.ColorTransform;
|
||||
import com.jpexs.decompiler.flash.types.MATRIX;
|
||||
import com.jpexs.decompiler.flash.types.RGBA;
|
||||
import com.jpexs.decompiler.flash.types.annotations.Conditional;
|
||||
import com.jpexs.decompiler.flash.types.annotations.HideInRawEdit;
|
||||
import com.jpexs.decompiler.flash.types.annotations.Internal;
|
||||
import com.jpexs.decompiler.flash.types.annotations.Reserved;
|
||||
import com.jpexs.decompiler.flash.types.annotations.SWFArray;
|
||||
@@ -568,8 +567,12 @@ public class PlaceObject4Tag extends PlaceObjectTypeTag implements ASMSourceCont
|
||||
matrix = m;
|
||||
boolean mod = isModified();
|
||||
setModified(true);
|
||||
super.writeTag(sos);
|
||||
setModified(mod);
|
||||
try {
|
||||
super.writeTag(sos);
|
||||
} finally {
|
||||
setModified(mod);
|
||||
}
|
||||
|
||||
matrix = old;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,7 +236,12 @@ public class PlaceObjectTag extends PlaceObjectTypeTag {
|
||||
matrix = m;
|
||||
boolean mod = isModified();
|
||||
setModified(true);
|
||||
super.writeTag(sos);
|
||||
try {
|
||||
super.writeTag(sos);
|
||||
} finally {
|
||||
setModified(mod);
|
||||
}
|
||||
|
||||
setModified(mod);
|
||||
matrix = old;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user