projects
/
debian
/
openrocket
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
DGP - added isCompatible checks for all Rocksim components
[debian/openrocket]
/
src
/
net
/
sf
/
openrocket
/
file
/
rocksim
/
LaunchLugHandler.java
diff --git
a/src/net/sf/openrocket/file/rocksim/LaunchLugHandler.java
b/src/net/sf/openrocket/file/rocksim/LaunchLugHandler.java
index 969cfdbf3ef6883657c49444ca52206dc1d91fc6..049feedd8579b4fd05f6a629938a1bde28cf9428 100644
(file)
--- a/
src/net/sf/openrocket/file/rocksim/LaunchLugHandler.java
+++ b/
src/net/sf/openrocket/file/rocksim/LaunchLugHandler.java
@@
-27,14
+27,18
@@
class LaunchLugHandler extends PositionDependentHandler<LaunchLug> {
* Constructor.
*
* @param c the parent
* Constructor.
*
* @param c the parent
+ * @param warnings the warning set
+ *
* @throws IllegalArgumentException thrown if <code>c</code> is null
*/
* @throws IllegalArgumentException thrown if <code>c</code> is null
*/
- public LaunchLugHandler(RocketComponent c) throws IllegalArgumentException {
+ public LaunchLugHandler(RocketComponent c
, WarningSet warnings
) throws IllegalArgumentException {
if (c == null) {
throw new IllegalArgumentException("The parent component of a launch lug may not be null.");
}
lug = new LaunchLug();
if (c == null) {
throw new IllegalArgumentException("The parent component of a launch lug may not be null.");
}
lug = new LaunchLug();
- c.addChild(lug);
+ if (isCompatible(c, LaunchLug.class, warnings)) {
+ c.addChild(lug);
+ }
}
@Override
}
@Override