X-Git-Url: http://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=tim%2Fprune%2Fgui%2FMapChart.java;h=37f43663c8c40ab28c511a0adf957610a781d738;hp=a5e7819ba209ab14e6b565fc31e49cca1523e091;hb=ca9bdb3916f9c39adbbf95d06ac95c21dafbb4e6;hpb=63f178fd6c6b30b99a01f2a2d700963ea2dfef8b diff --git a/tim/prune/gui/MapChart.java b/tim/prune/gui/MapChart.java index a5e7819..37f4366 100644 --- a/tim/prune/gui/MapChart.java +++ b/tim/prune/gui/MapChart.java @@ -23,7 +23,6 @@ import tim.prune.DataSubscriber; import tim.prune.I18nManager; import tim.prune.data.DataPoint; import tim.prune.data.TrackInfo; -//import tim.prune.gui.map.MapWindow; /** @@ -34,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; @@ -252,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); } @@ -388,21 +389,11 @@ 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); _popup.add(_autoPanMenuItem); -/* - JMenuItem mapItem = new JMenuItem("Show map"); - mapItem.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) - { - showMap(); - } - }); - _popup.add(mapItem); -*/ } @@ -642,15 +633,4 @@ public class MapChart extends GenericChart implements MouseWheelListener, KeyLis { // ignore } - - /** - * Show a map window - probably only temporarily here until it gets fixed - */ -/* - private void showMap() - { - MapWindow map = new MapWindow(_track); - map.show(); - } -*/ }