Reverted Ohm symbol changes that made it render wrong on some systems

This commit is contained in:
Branislav Stojkovic
2019-01-26 15:40:55 +01:00
parent 197f9ca216
commit 0c76b93db0
5 changed files with 8 additions and 3 deletions
@@ -109,7 +109,7 @@ public class Resistance extends AbstractMeasure<ResistanceUnit> {
}
public static Resistance parseResistance(String value) {
value = value.replace("*", "").replace("R", "Ω");
value = value.replace("*", "").replace("R", "\u2126");
for (ResistanceUnit unit : ResistanceUnit.values()) {
if (value.toLowerCase().endsWith(unit.toString().toLowerCase())) {
value = value.substring(0, value.length() - unit.toString().length()).trim();
@@ -23,7 +23,7 @@ package org.diylc.core.measures;
public enum ResistanceUnit implements Unit {
R(1, "Ω"), K(1e3, "K"), M(1e6, "M");
R(1, "\u2126"), K(1e3, "K"), M(1e6, "M");
double factor;
String display;
@@ -35,7 +35,8 @@ public enum ResistanceUnit implements Unit {
@Override
public double getFactor() {
return factor;
return factor;
}
@Override
Binary file not shown.
Binary file not shown.
+4
View File
@@ -2329,6 +2329,10 @@
<org.diylc.appframework.update.Change>
<changeType>IMPROVEMENT</changeType>
<description>Better selection rendering for a few components, mostly electro-mechanical</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>BUG_FIX</changeType>
<description>Reverted Ohm symbol changes that made it render wrong on some systems</description>
</org.diylc.appframework.update.Change>
</changes>
<url>https://github.com/bancika/diy-layout-creator/releases</url>