Skip to content

Commit d2126a2

Browse files
committed
fix bug #158
1 parent e9cc706 commit d2126a2

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Course Generator is a software which can estimate your time in road running race
44

55
![Course Generator Main window](https://imgur.com/4tM7kUR.png)
66

7-
## Status : Version 4.3.1 (stable)
7+
## Status : Version 4.3.2 (stable)
88

99
## History
1010
I created Course Generator in 2008 for my first 100 km ultra trail. Since then, I added a lot of features and it has been used by a lot of french ultra-runner. Up to the version 3.88 it has been written in C# and now java is used in order to be cross platform (Windows, Mac OS and Linux) and multilingual.

build/course_generator.jar

42 Bytes
Binary file not shown.

src/course_generator/frmMain.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
public class frmMain extends javax.swing.JFrame {
165165
private static final long serialVersionUID = 6484405417503538528L;
166166

167-
private final static String Version = "4.3.1";
167+
private final static String Version = "4.3.2";
168168

169169
public static boolean inEclipse = false;
170170
public static CgLog log = null;

src/course_generator/maps/JPanelMaps.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,7 @@ public void RefreshTrack(TrackData tdata, boolean zoom2fit) {
546546

547547
// -- Create the night tracks
548548
int cmpt = 0;
549+
int cmptNight = 0;
549550
boolean found = false;
550551
List<Coordinate> routeNight = null;
551552
MapPolyLine polyLineNight = null;
@@ -565,22 +566,25 @@ public void RefreshTrack(TrackData tdata, boolean zoom2fit) {
565566
polyLineNight.setColor(cl_Transp);
566567

567568
polyLineNight.setStroke(new BasicStroke(Settings.NightTrackWidth));
569+
cmptNight++;
568570
found = true;
569571
} else if (r.getNight() && found) {
570572
routeNight.add(new Coordinate(r.getLatitude(), r.getLongitude()));
573+
cmptNight++;
571574
} else if (!r.getNight() && found) {
572575
MapViewer.addMapPolygon(polyLineNight);
573576
found = false;
574577
}
575578
}
576579

577580
//-- Finish the night polyline
578-
polyLineNight = new MapPolyLine(routeNight);
579-
polyLineNight.setColor(cl_Transp);
580-
polyLineNight.setStroke(new BasicStroke(Settings.NightTrackWidth));
581-
// -- Add the polyline to the viewer
582-
MapViewer.addMapPolygon(polyLineNight);
583-
581+
if (cmptNight>0) {
582+
polyLineNight = new MapPolyLine(routeNight);
583+
polyLineNight.setColor(cl_Transp);
584+
polyLineNight.setStroke(new BasicStroke(Settings.NightTrackWidth));
585+
// -- Add the polyline to the viewer
586+
MapViewer.addMapPolygon(polyLineNight);
587+
}
584588

585589
// -- Create the tracks (over the night tracks if necessary)
586590
cmpt = 0;

tools/CG_Install_Script.nsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# These three must be integers
1414
!define VERSIONMAJOR 4
1515
!define VERSIONMINOR 3
16-
!define VERSIONBUILD 1
16+
!define VERSIONBUILD 2
1717
# These will be displayed by the "Click here for support information" link in "Add/Remove Programs"
1818
# It is possible to use "mailto:" links in here to open the email client
1919
!define HELPURL "https://techandrun.com/course-generator/" # "Support Information" link

0 commit comments

Comments
 (0)