Skip to content

Commit 04be30e

Browse files
committed
Make sure the delete step selects the correct next operation
1 parent e81f676 commit 04be30e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/com/neuronrobotics/bowlerstudio/scripting/cadoodle/CaDoodleFile.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,8 @@ public void run() {
439439
if (getOpperations().get(i) == op)
440440
index = i;
441441
getOpperations().remove(op);
442-
if (index == getOpperations().size())
443-
index -= 1;
442+
// if (index == getOpperations().size())
443+
// index -= 1;
444444
if (index < 1)
445445
index = 1;
446446
ICaDoodleOpperation newTar = getOpperations().get(index - 1);
@@ -545,6 +545,7 @@ private OperationResult pruneForward(ICaDoodleOpperation op) throws Exception {
545545
return res;
546546
}
547547
}
548+
if( getCurrentIndex() >0)
548549
for (int i = getCurrentIndex() - 1; i < getOpperations().size(); i++) {
549550
ICaDoodleOpperation key = getOpperations().get(i);
550551
if (i >= getCurrentIndex()) {

0 commit comments

Comments
 (0)