Skip to content
Snippets Groups Projects
Commit 3d08221e authored by Thomas Oster's avatar Thomas Oster
Browse files

Fix

parent 7bad216e
No related branches found
No related tags found
No related merge requests found
...@@ -61,6 +61,7 @@ public class VectorCommand ...@@ -61,6 +61,7 @@ public class VectorCommand
{ {
if (type == CmdType.SETPROPERTY) if (type == CmdType.SETPROPERTY)
{ {
this.type = type;
this.property = p; this.property = p;
} }
else else
......
...@@ -41,8 +41,13 @@ public class VectorPart ...@@ -41,8 +41,13 @@ public class VectorPart
public VectorPart(LaserProperty initialProperty) public VectorPart(LaserProperty initialProperty)
{ {
if (initialProperty == null)
{
throw new IllegalArgumentException("Initial Property must not be null");
}
commands = new LinkedList<VectorCommand>(); commands = new LinkedList<VectorCommand>();
this.setProperty(initialProperty); this.currentCuttingProperty = initialProperty;
commands.add(new VectorCommand(VectorCommand.CmdType.SETPROPERTY, initialProperty));
} }
public LaserProperty getCurrentCuttingProperty() public LaserProperty getCurrentCuttingProperty()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment