Add multi-comp edit for nose cone flip

This commit is contained in:
SiboVG 2023-01-08 03:11:26 +01:00
parent 0120ba7bcc
commit ac03080588

View File

@ -195,10 +195,17 @@ public class NoseCone extends Transition implements InsideColorComponent {
* @param sanityCheck whether to check if the auto radius parameter can be used for the new nose cone orientation
*/
public void setFlipped(boolean flipped, boolean sanityCheck) {
for (RocketComponent listener : configListeners) {
if (listener instanceof NoseCone) {
((NoseCone) listener).setFlipped(flipped, sanityCheck);
}
}
if (isFlipped == flipped) {
return;
}
boolean previousByPass = getBypassComponentChangeEvent();
setBypassChangeEvent(true);
if (flipped) {
setForeRadius(getAftRadiusNoAutomatic());
@ -219,7 +226,7 @@ public class NoseCone extends Transition implements InsideColorComponent {
resetForeRadius();
}
setBypassChangeEvent(false);
setBypassChangeEvent(previousByPass);
isFlipped = flipped;
fireComponentChangeEvent(ComponentChangeEvent.BOTH_CHANGE);