X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.plant3d%2Fsrc%2Forg%2Fsimantics%2Fplant3d%2Factions%2FAddComponentAction.java;h=0ee0f6bc2bbcfbf137148357f50f47e70edba792;hb=9029e681fb0c47e9041c5527b966a247b23029b3;hp=d9ee9d70849188f7f50e7ba0bc2b58513609c3ac;hpb=b464f638f47c449c3ddad850a2466773c3453999;p=simantics%2F3d.git diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/actions/AddComponentAction.java b/org.simantics.plant3d/src/org/simantics/plant3d/actions/AddComponentAction.java index d9ee9d70..0ee0f6bc 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/actions/AddComponentAction.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/actions/AddComponentAction.java @@ -50,6 +50,8 @@ public class AddComponentAction extends vtkSwtAction { private String libUri; + private double lengthFactor = 1.0; + public AddComponentAction(InteractiveVtkComposite panel, P3DRootNode root, String libUri) { super(panel); this.root = root; @@ -60,6 +62,10 @@ public class AddComponentAction extends vtkSwtAction { this.libUri = libUri; } + public void setLengthFactor(double lengthFactor) { + this.lengthFactor = lengthFactor; + } + public void setComponent(PipelineComponent component) { this.component = component; @@ -97,6 +103,7 @@ public class AddComponentAction extends vtkSwtAction { // Set list of already reserved component names dialog.addUsedNames(ComponentUtils.getPipelineComponentNames(root)); + dialog.setLengthFactor(lengthFactor); if (dialog.open() == ComponentSelectionDialog.CANCEL) return;