Skip to content

Commit

Permalink
Merge pull request #3058 from DanielBoudreau/master
Browse files Browse the repository at this point in the history
Don't print line if user has deleted all text
  • Loading branch information
DanielBoudreau committed Feb 14, 2017
2 parents 55cbb37 + 21709bf commit 923bd65
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion help/en/package/jmri/jmrit/operations/Operations.shtml
Original file line number Diff line number Diff line change
Expand Up @@ -3000,7 +3000,6 @@
The program when searching for a track to set out the kernel will only use the lead car's
attributes when determining if the track can accept the kernel. However, the program does use the
entire length of the kernel to determine if the group of cars will fit on the destination track.
Manifest and switch lists will show the cars in the order that you assigned them to the kernel.
Picking up or dropping off a kernel is regarded as one "move" when defining the number of moves
in a train's route.

Expand Down
4 changes: 3 additions & 1 deletion java/src/jmri/jmrit/operations/trains/TrainManifest.java
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,9 @@ private void printChange(PrintWriter fileOut, RouteLocation rl, Train train, int
}

private void newLine(PrintWriter file, String string) {
newLine(file, string, IS_MANIFEST);
if (!string.isEmpty()) {
newLine(file, string, IS_MANIFEST);
}
}

}
4 changes: 3 additions & 1 deletion java/src/jmri/jmrit/operations/trains/TrainSwitchLists.java
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,9 @@ public void printSwitchList(Location location, boolean isPreview) {
}

protected void newLine(PrintWriter file, String string) {
newLine(file, string, !IS_MANIFEST);
if (!string.isEmpty()) {
newLine(file, string, !IS_MANIFEST);
}
}

private final static Logger log = LoggerFactory.getLogger(TrainSwitchLists.class.getName());
Expand Down

0 comments on commit 923bd65

Please sign in to comment.