mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 12:21:04 +00:00
Issue #79 ActionStartDrag constraint fix
This commit is contained in:
@@ -43,15 +43,8 @@ public class ActionStartDrag extends Action {
|
||||
|
||||
boolean hasConstrains = true;
|
||||
if (constrain instanceof DirectValueTreeItem) {
|
||||
if (((DirectValueTreeItem) constrain).value instanceof Long) {
|
||||
if (((long) (Long) ((DirectValueTreeItem) constrain).value) == 0) {
|
||||
hasConstrains = false;
|
||||
}
|
||||
}
|
||||
if (((DirectValueTreeItem) constrain).value instanceof Boolean) {
|
||||
if (((boolean) (Boolean) ((DirectValueTreeItem) constrain).value) == false) {
|
||||
hasConstrains = false;
|
||||
}
|
||||
if (Double.compare(constrain.toNumber(), 0) == 0) {
|
||||
hasConstrains = false;
|
||||
}
|
||||
}
|
||||
GraphTargetItem x1 = null;
|
||||
|
||||
@@ -45,15 +45,8 @@ public class StartDragTreeItem extends TreeItem {
|
||||
public String toString(ConstantPool constants) {
|
||||
boolean hasConstrains = true;
|
||||
if (constrain instanceof DirectValueTreeItem) {
|
||||
if (((DirectValueTreeItem) constrain).value instanceof Long) {
|
||||
if (((long) (Long) ((DirectValueTreeItem) constrain).value) == 0) {
|
||||
hasConstrains = false;
|
||||
}
|
||||
}
|
||||
if (((DirectValueTreeItem) constrain).value instanceof Boolean) {
|
||||
if (((boolean) (Boolean) ((DirectValueTreeItem) constrain).value) == false) {
|
||||
hasConstrains = false;
|
||||
}
|
||||
if (Double.compare(constrain.toNumber(), 0) == 0) {
|
||||
hasConstrains = false;
|
||||
}
|
||||
}
|
||||
return hilight("startDrag(") + target.toString(constants) + hilight(",") + lockCenter.toString(constants) + (hasConstrains ? hilight(",") + x1.toString(constants) + hilight(",") + y1.toString(constants) + hilight(",") + x2.toString(constants) + hilight(",") + y2.toString(constants) : "") + hilight(")");
|
||||
|
||||
Reference in New Issue
Block a user