Commit 9a0f6536 authored by Robert Smith's avatar Robert Smith
Browse files

Fixed cloning problems



Fixed a coupld of classes which weren't cloning properly.
Signed-off-by: Robert Smith's avatarRobert Smith <SmithRW@ornl.gov>
parent 12a4a987
......@@ -134,4 +134,27 @@ public class PointController extends AbstractController {
return clone;
}
/*
* (non-Javadoc)
*
* @see
* org.eclipse.ice.viz.service.modeling.AbstractController#copy(org.eclipse.
* ice.viz.service.modeling.AbstractController)
*/
@Override
public void copy(AbstractController otherObject) {
// Create the model and give it a reference to this
model = new PointMesh();
model.setController(this);
// Copy the other object's data members
model.copy(otherObject.model);
view = (AbstractView) otherObject.view.clone();
// Register as a listener to the model and view
model.register(this);
view.register(this);
}
}
......@@ -13,7 +13,6 @@ package org.eclipse.ice.viz.service.modeling;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Set;
import org.eclipse.ice.viz.service.datastructures.VizObject.SubscriptionType;
......@@ -92,8 +91,7 @@ public class VertexMesh extends PointMesh {
catList.add(entity);
entities.put(category, catList);
SubscriptionType[] eventTypes = {
SubscriptionType.CHILD };
SubscriptionType[] eventTypes = { SubscriptionType.CHILD };
updateManager.notifyListeners(eventTypes);
}
......@@ -112,7 +110,7 @@ public class VertexMesh extends PointMesh {
public Object clone() {
// Create a new component, and make it a copy of this one.
PointMesh clone = new PointMesh();
VertexMesh clone = new VertexMesh();
clone.copy(this);
return clone;
}
......@@ -150,8 +148,7 @@ public class VertexMesh extends PointMesh {
}
// Notify listeners of the change
SubscriptionType[] eventTypes = {
SubscriptionType.PROPERTY };
SubscriptionType[] eventTypes = { SubscriptionType.PROPERTY };
updateManager.notifyListeners(eventTypes);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment