From 0ace9a91634271f30743792e9a57853485b1744e Mon Sep 17 00:00:00 2001 From: Bernard Normier Date: Fri, 5 Oct 2007 13:18:00 -0400 Subject: Fixed bug #2499 --- java/src/IceGridGUI/Application/Node.java | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'java/src/IceGridGUI/Application/Node.java') diff --git a/java/src/IceGridGUI/Application/Node.java b/java/src/IceGridGUI/Application/Node.java index 748d12679ed..46cd5a029f9 100755 --- a/java/src/IceGridGUI/Application/Node.java +++ b/java/src/IceGridGUI/Application/Node.java @@ -305,11 +305,31 @@ class Node extends TreeNode implements PropertySetParent } else if(descriptor instanceof ServerInstanceDescriptor) { - newServer(ServerInstance.copyDescriptor((ServerInstanceDescriptor)descriptor)); + // + // Remove any extra parameters + // + ServerInstanceDescriptor sid = ServerInstance.copyDescriptor((ServerInstanceDescriptor)descriptor); + + TemplateDescriptor td = getRoot().findServerTemplateDescriptor(sid.template); + + if(td != null) + { + sid.parameterValues.keySet().retainAll(td.parameters); + } + + newServer(sid); } else { - newServer(PlainServer.copyDescriptor(((ServerDescriptor)descriptor))); + ServerDescriptor sd = PlainServer.copyDescriptor((ServerDescriptor)descriptor); + if(sd instanceof IceBoxDescriptor) + { + if(!getRoot().pasteIceBox((IceBoxDescriptor)sd)) + { + return; + } + } + newServer(sd); } } -- cgit v1.2.3