Skip to content

Commit

Permalink
Fixed issue #1108.
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsschmidt1337 committed Sep 17, 2024
1 parent 1ac4ba9 commit db8a3cd
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/org/nschmidt/ldparteditor/data/RingsAndCones.java
Original file line number Diff line number Diff line change
Expand Up @@ -411,22 +411,13 @@ private int getDigits(long l) {
String sfs = MathHelper.roundBigDecimalToStringAlways(sf);
String radiusSuffix = "" + solutionR[i]; //$NON-NLS-1$

String middle;
final String middle;
if (rs.isUsingCones()) {
step = new BigDecimal(solutionR2[i + 1] - solutionR2[i]).divide(width, Threshold.MC).multiply(rs.getHeight());
middle = "con"; //$NON-NLS-1$
height = height.add(step);
} else {
middle = "ring"; //$NON-NLS-1$
if (rs.isUsingHiRes()) {
if (anglePrefix.length() + radiusSuffix.length() > 7) {
middle = middle.substring(0, 3);
}
} else {
if (anglePrefix.length() + radiusSuffix.length() > 4) {
middle = middle.substring(0, 3);
}
}
}


Expand Down Expand Up @@ -564,7 +555,7 @@ private static void initExistanceMap(boolean cones, boolean hiRes) {
existanceMap.clear();

Pattern coneP = Pattern.compile("\\d+\\-\\d+con\\d{1,2}\\.dat"); //$NON-NLS-1$
Pattern ringP = Pattern.compile("\\d+\\-\\d+ring{0,1}\\d{1,2}\\.dat"); //$NON-NLS-1$
Pattern ringP = Pattern.compile("\\d+\\-\\d+ring\\d{1,2}\\.dat"); //$NON-NLS-1$

StringBuilder upper = new StringBuilder();
StringBuilder lower = new StringBuilder();
Expand Down

0 comments on commit db8a3cd

Please sign in to comment.