Add multi-comp edit for nose cone flip
This commit is contained in:
parent
0120ba7bcc
commit
ac03080588
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user