]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - tim/prune/gui/MapChart.java
Version 5, May 2008
[GpsPrune.git] / tim / prune / gui / MapChart.java
index a22cb1811b9bc513c135173011db478e24ea2ef8..37f43663c8c40ab28c511a0adf957610a781d738 100644 (file)
@@ -33,7 +33,7 @@ public class MapChart extends GenericChart implements MouseWheelListener, KeyLis
        // Constants
        private static final int POINT_RADIUS = 4;
        private static final int CLICK_SENSITIVITY = 10;
-       private static final double ZOOM_SCALE_FACTOR = 1.2;
+       private static final double ZOOM_SCALE_FACTOR = 1.4;
        private static final int PAN_DISTANCE = 10;
        private static final int LIMIT_WAYPOINT_NAMES = 40;
 
@@ -251,8 +251,10 @@ public class MapChart extends GenericChart implements MouseWheelListener, KeyLis
                                bufferedG.drawRect(x - 2, y - 2, 3, 3);
 
                                // See whether to connect the point with previous one or not
-                               currPointTrackpoint = !_track.getPoint(i).isWaypoint() && _track.getPoint(i).getPhoto() == null;
-                               if (_connectPointsMenuItem.isSelected() && currPointTrackpoint && lastPointTrackpoint)
+                               DataPoint point = _track.getPoint(i);
+                               currPointTrackpoint = !point.isWaypoint() && point.getPhoto() == null;
+                               if (_connectPointsMenuItem.isSelected() && currPointTrackpoint && lastPointTrackpoint
+                                       && !point.getSegmentStart())
                                {
                                        bufferedG.drawLine(lastX, lastY, x, y);
                                }
@@ -387,7 +389,7 @@ public class MapChart extends GenericChart implements MouseWheelListener, KeyLis
                                dataUpdated(DataSubscriber.ALL);
                        }
                });
-               _connectPointsMenuItem.setSelected(false);
+               _connectPointsMenuItem.setSelected(true);
                _popup.add(_connectPointsMenuItem);
                _autoPanMenuItem = new JCheckBoxMenuItem(I18nManager.getText("menu.map.autopan"));
                _autoPanMenuItem.setSelected(true);