[resolves #367] Can no longer add Components to rocket directly (add buttons are greyed-out)
This commit is contained in:
parent
212685b026
commit
4ce1e8ef0d
@ -512,14 +512,17 @@ public class ComponentAddButtons extends JPanel implements Scrollable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAddable(RocketComponent c) {
|
||||
if (super.isAddable(c))
|
||||
public boolean isAddable(RocketComponent selectedComponent) {
|
||||
if (super.isAddable(selectedComponent)) {
|
||||
return true;
|
||||
// Handled separately:
|
||||
if (c instanceof BodyComponent)
|
||||
return true;
|
||||
if (c == null || c instanceof Rocket)
|
||||
}else if (selectedComponent instanceof BodyComponent) {
|
||||
// Handled separately:
|
||||
return true;
|
||||
}else if (selectedComponent == null) {
|
||||
return false;
|
||||
}else if( selectedComponent instanceof Rocket) {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user