Fixed #5609
This commit is contained in:
@@ -16,6 +16,7 @@ import arc.util.*;
|
||||
import mindustry.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
import mindustry.logic.LStatements.*;
|
||||
import mindustry.ui.*;
|
||||
|
||||
public class LCanvas extends Table{
|
||||
@@ -395,7 +396,16 @@ public class LCanvas extends Table{
|
||||
}
|
||||
|
||||
public void copy(){
|
||||
st.saveUI();
|
||||
LStatement copy = st.copy();
|
||||
|
||||
if(copy instanceof JumpStatement st && st.destIndex != -1){
|
||||
int index = statements.getChildren().indexOf(this);
|
||||
if(index != -1 && index < st.destIndex){
|
||||
st.destIndex ++;
|
||||
}
|
||||
}
|
||||
|
||||
if(copy != null){
|
||||
StatementElem s = new StatementElem(copy);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user