mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 09:00:55 +00:00
Added #2098 Shape points editation - Protection against saving too large edges
This commit is contained in:
@@ -114,6 +114,7 @@ import javax.swing.Box;
|
||||
import javax.swing.ButtonGroup;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JSplitPane;
|
||||
import javax.swing.JToggleButton;
|
||||
@@ -2154,6 +2155,28 @@ public class PreviewPanel extends JPersistentSplitPane implements TagEditorPanel
|
||||
displayEditGenericPanel.setVisible(true);
|
||||
}
|
||||
if (displayEditMode == EDIT_POINTS) {
|
||||
List<SHAPERECORD> shapeRecords = null;
|
||||
if (displayEditTag instanceof ShapeTag) {
|
||||
ShapeTag shape = (ShapeTag) displayEditTag;
|
||||
shapeRecords = shape.shapes.shapeRecords;
|
||||
}
|
||||
if (displayEditTag instanceof MorphShapeTag) {
|
||||
MorphShapeTag morphShape = (MorphShapeTag) displayEditTag;
|
||||
if (morphDisplayMode == MORPH_START) {
|
||||
shapeRecords = morphShape.getStartEdges().shapeRecords;
|
||||
}
|
||||
if (morphDisplayMode == MORPH_END) {
|
||||
shapeRecords = morphShape.getEndEdges().shapeRecords;
|
||||
}
|
||||
}
|
||||
if (shapeRecords != null) {
|
||||
for (SHAPERECORD rec : shapeRecords) {
|
||||
if (rec.isTooLarge()) {
|
||||
ViewMessages.showMessageDialog(this, AppStrings.translate("error.shapeTooLarge"), AppStrings.translate("error"), JOptionPane.ERROR_MESSAGE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
displayEditImagePanel.setHilightedPoints(null);
|
||||
displayEditTag.setModified(true);
|
||||
if (displayEditTag instanceof ShapeTag) {
|
||||
|
||||
@@ -1170,4 +1170,6 @@ message.info.importSprites = During importing sprites, you need to select a FOLD
|
||||
|
||||
import.sprite.result = %count% sprites imported.
|
||||
|
||||
menu.file.import.sprite = Import sprites from GIF
|
||||
menu.file.import.sprite = Import sprites from GIF
|
||||
|
||||
error.shapeTooLarge = One or more edge lengths of the shape is too large to save.\r\nPlease move points closer, resize shape or insert a point in the middle of long edges before proceeding.
|
||||
|
||||
@@ -1148,3 +1148,5 @@ button.abcexploretrait = Zobrazit vlastnost v pr\u016fzkumn\u00edku ABC
|
||||
binarydata.swfInside.packer = Vypad\u00e1 to, \u017ee uvnit\u0159 v tomto BinaryData tagu se nach\u00e1z\u00ed SWF soubor zabalen\u00fd pomoc\u00ed %packer%. Klikn\u011bte zde pro jeho rozbalen\u00ed a na\u010dten\u00ed jako podstrom.
|
||||
|
||||
button.replaceWithGif = Nahradit GIFem...
|
||||
|
||||
error.shapeTooLarge = Jedna \u010di v\u00edce hran v tvaru je moc dlouh\u00e1 pro ulo\u017een\u00ed.\r\nPros\u00edm p\u0159ed pokra\u010dov\u00e1n\u00edm p\u0159esu\u0148te body bl\u00ed\u017ee, zmen\u0161ete tvar nebo vlo\u017ete bod doprost\u0159ed dlouh\u00e9 hrany.
|
||||
|
||||
Reference in New Issue
Block a user