Commit 8cd819a9dff813f9fb9e639ea4e9e9a277b29271
1 parent
fe0fb87e
Exists in
master
Changed ABout to what version is : 2.6.9 - June 2019
Control : about CSU precision. Add rounding method when writing CSU calculation and slit/object positions
Showing
2 changed files
with
8 additions
and
3 deletions
Show diff stats
src/osp/ui/OSPE_AboutBoxPanel.java
@@ -23,7 +23,7 @@ public class OSPE_AboutBoxPanel extends JDialog { | @@ -23,7 +23,7 @@ public class OSPE_AboutBoxPanel extends JDialog { | ||
23 | /** Product name */ | 23 | /** Product name */ |
24 | private String product = "OSP Editor"; | 24 | private String product = "OSP Editor"; |
25 | /** Current version */ | 25 | /** Current version */ |
26 | - private String version = "version 2.6.8 - May 16th 2019"; | 26 | + private String version = "version 2.6.9 - June 25th 2019"; |
27 | /** Copyright information */ | 27 | /** Copyright information */ |
28 | private String copyright = "Copyright (c)"; | 28 | private String copyright = "Copyright (c)"; |
29 | /** Comments */ | 29 | /** Comments */ |
src/osp/ui/OspeControl.java
@@ -9,6 +9,7 @@ import java.awt.geom.Point2D; | @@ -9,6 +9,7 @@ import java.awt.geom.Point2D; | ||
9 | import java.io.File; | 9 | import java.io.File; |
10 | import java.io.FileWriter; | 10 | import java.io.FileWriter; |
11 | import java.io.IOException; | 11 | import java.io.IOException; |
12 | +import java.math.RoundingMode; | ||
12 | import java.net.URL; | 13 | import java.net.URL; |
13 | import java.nio.file.Paths; | 14 | import java.nio.file.Paths; |
14 | import java.text.DecimalFormat; | 15 | import java.text.DecimalFormat; |
@@ -1716,11 +1717,14 @@ WorldCoords wc = new WorldCoords(ptM.x,ptM.y); | @@ -1716,11 +1717,14 @@ WorldCoords wc = new WorldCoords(ptM.x,ptM.y); | ||
1716 | 1717 | ||
1717 | DecimalFormat nf; | 1718 | DecimalFormat nf; |
1718 | nf = new DecimalFormat("000.000"); | 1719 | nf = new DecimalFormat("000.000"); |
1719 | - | 1720 | + nf.setRoundingMode(RoundingMode.HALF_EVEN); |
1721 | + | ||
1720 | tab[i][0]=String.valueOf((int)idSlit); | 1722 | tab[i][0]=String.valueOf((int)idSlit); |
1721 | tab[i][1]= nf.format(csup_left); | 1723 | tab[i][1]= nf.format(csup_left); |
1724 | + | ||
1722 | tab[i][2]=String.valueOf((int)idSlit2); | 1725 | tab[i][2]=String.valueOf((int)idSlit2); |
1723 | tab[i][3]=nf.format(csup_right); | 1726 | tab[i][3]=nf.format(csup_right); |
1727 | + | ||
1724 | if (isRef) tab[i][4]=String.valueOf((int)2); | 1728 | if (isRef) tab[i][4]=String.valueOf((int)2); |
1725 | else if (isJoined) tab[i][4]=joinedInfo; | 1729 | else if (isJoined) tab[i][4]=joinedInfo; |
1726 | else tab[i][4]=String.valueOf((int)affected); | 1730 | else tab[i][4]=String.valueOf((int)affected); |
@@ -1731,7 +1735,8 @@ WorldCoords wc = new WorldCoords(ptM.x,ptM.y); | @@ -1731,7 +1735,8 @@ WorldCoords wc = new WorldCoords(ptM.x,ptM.y); | ||
1731 | tab[i][9]=nf.format(xr_left); | 1735 | tab[i][9]=nf.format(xr_left); |
1732 | tab[i][10]=nf.format(yr_left); | 1736 | tab[i][10]=nf.format(yr_left); |
1733 | tab[i][11]=nf.format(xr_right); | 1737 | tab[i][11]=nf.format(xr_right); |
1734 | - tab[i][12]=nf.format(yr_right); | 1738 | + tab[i][12]=nf.format(yr_right); |
1739 | + | ||
1735 | int v=joinedRefId+1; | 1740 | int v=joinedRefId+1; |
1736 | tab[i][13]=String.valueOf((int)v); | 1741 | tab[i][13]=String.valueOf((int)v); |
1737 | isRef=false; | 1742 | isRef=false; |