diff --git a/src/main/java/io/github/jadefalke2/actions/LineAction.java b/src/main/java/io/github/jadefalke2/actions/LineAction.java index 36f637d..05ae0cf 100644 --- a/src/main/java/io/github/jadefalke2/actions/LineAction.java +++ b/src/main/java/io/github/jadefalke2/actions/LineAction.java @@ -4,6 +4,7 @@ import io.github.jadefalke2.Script; import java.util.Arrays; +import java.util.stream.IntStream; public class LineAction implements Action{ @@ -70,7 +71,7 @@ private void replaceRows(int[] rows, InputLine[] replacement){ if(rows.length < replacement.length) //missing frames -> add emptys that there are enough to replace insertEmptyRows(replacement.length - rows.length); if(rows.length > replacement.length) //too many frames -> remove redundant lines - deleteRows(false, Arrays.copyOfRange(rows, replacement.length, rows.length)); + deleteRows(Arrays.copyOfRange(rows, replacement.length, rows.length)); for(int i=0;i= 0; i--){ - int row = undo ? rows[i]+rows.length : rows[i]; + int row = rows[i]; script.removeRow(row); } }