1212import com .modsim .modules .parts .Port ;
1313import com .modsim .simulator .*;
1414import com .modsim .tools .*;
15- import com .modsim .util .BezierPath ;
15+ import com .modsim .util .Path ;
1616import com .modsim .util .Vec2 ;
1717
1818/**
@@ -34,7 +34,7 @@ public class ViewUtil implements MouseListener, MouseMotionListener, MouseWheelL
3434 */
3535 public static Link worldSpace_linkAt (Vec2 pt ) {
3636 for (Link link : Main .sim .getLinks ()) {
37- BezierPath .PointInfo info = link .path .approxClosestPoint (pt , 6 );
37+ Path .PointInfo info = link .path .approxClosestPoint (pt , 6 );
3838
3939 if (info .dist < 15.0 ) {
4040 return link ;
@@ -267,12 +267,12 @@ public void mousePressed(MouseEvent e) {
267267 boolean handled = false ;
268268 if (targ != null && targ .getType () == PickableEntity .MODULE ) {
269269 BaseModule m = (BaseModule ) targ ;
270- handled = m .lbDown (e .getX (), e .getY ());
270+ handled = m .lbDown (e .getX (), e .getY (), e . isShiftDown () );
271271 }
272272
273273 if (!handled ) {
274274 if (tool != null ) {
275- Main .ui .view .curTool = tool .lbDown (e .getX (), e .getY ());
275+ Main .ui .view .curTool = tool .lbDown (e .getX (), e .getY (), e . isShiftDown () );
276276 }
277277 else {
278278 Port p = screenSpace_portAt (e .getX (), e .getY ());
@@ -282,7 +282,7 @@ public void mousePressed(MouseEvent e) {
282282 //Link behaviour
283283 if (p != null ) {
284284 tool = new MakeLinkTool ();
285- Main .ui .view .curTool = tool .lbDown (e .getX (), e .getY ());
285+ Main .ui .view .curTool = tool .lbDown (e .getX (), e .getY (), e . isShiftDown () );
286286 }
287287 else {
288288 // Link edit if we haven't hit a module
@@ -299,7 +299,7 @@ public void mousePressed(MouseEvent e) {
299299
300300 // Finally, try selection behaviour
301301 tool = new SelectTool ();
302- Main .ui .view .curTool = tool .lbDown (e .getX (), e .getY ());
302+ Main .ui .view .curTool = tool .lbDown (e .getX (), e .getY (), e . isShiftDown () );
303303 }
304304 }
305305 }
0 commit comments