Open AdamBrezik opened 1 year ago
I don't really remember how this part is implemented so it may be eary or hard. Thanks for the suggestion btw, i will try to make it as soon as possible
This would be very convenient
Well, I couldn't even find the part. To be honest, I'd love your code to have more comments.
The split happens here EntirePizzaConfiguratorScreen#122. I think I managed to get it to work, where the previous action remains, with this code:
public void splitSlice(ConfigurablePizzaSlice clickedSlice) {
CircleSlice circleSlice = clickedSlice.getSlice();
editSlices.add(new RunnableSlice("Empty action", new CircleSlice(circleSlice.getMidAngle(), circleSlice.endAngle),clickedSlice.getManager()));
// Updates the clickedSlice's CircleSlice in place
((RunnableSlice) clickedSlice).setSlice(
new CircleSlice(circleSlice.startAngle, circleSlice.getMidAngle())
);
rebuildSlices();
}
It seems to be working without issue, anyway: https://youtu.be/R-nJYxt1qXU
Hello,
This is a suggestion for the situation when you're adding new actions by clicking on an action right mouse to split it in twine. Currently this deletes the item, creating 2 empty items. My suggestion is that first of the items retains the parameters of the item that is currently being deleted.
Kind regards,
Aidee