mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
Reverted Ohm symbol changes that made it render wrong on some systems
This commit is contained in:
@@ -109,7 +109,7 @@ public class Resistance extends AbstractMeasure<ResistanceUnit> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Resistance parseResistance(String value) {
|
public static Resistance parseResistance(String value) {
|
||||||
value = value.replace("*", "").replace("R", "Ω");
|
value = value.replace("*", "").replace("R", "\u2126");
|
||||||
for (ResistanceUnit unit : ResistanceUnit.values()) {
|
for (ResistanceUnit unit : ResistanceUnit.values()) {
|
||||||
if (value.toLowerCase().endsWith(unit.toString().toLowerCase())) {
|
if (value.toLowerCase().endsWith(unit.toString().toLowerCase())) {
|
||||||
value = value.substring(0, value.length() - unit.toString().length()).trim();
|
value = value.substring(0, value.length() - unit.toString().length()).trim();
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ package org.diylc.core.measures;
|
|||||||
|
|
||||||
public enum ResistanceUnit implements Unit {
|
public enum ResistanceUnit implements Unit {
|
||||||
|
|
||||||
R(1, "Ω"), K(1e3, "K"), M(1e6, "M");
|
R(1, "\u2126"), K(1e3, "K"), M(1e6, "M");
|
||||||
|
|
||||||
double factor;
|
double factor;
|
||||||
String display;
|
String display;
|
||||||
@@ -36,6 +36,7 @@ public enum ResistanceUnit implements Unit {
|
|||||||
@Override
|
@Override
|
||||||
public double getFactor() {
|
public double getFactor() {
|
||||||
return factor;
|
return factor;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -2330,6 +2330,10 @@
|
|||||||
<changeType>IMPROVEMENT</changeType>
|
<changeType>IMPROVEMENT</changeType>
|
||||||
<description>Better selection rendering for a few components, mostly electro-mechanical</description>
|
<description>Better selection rendering for a few components, mostly electro-mechanical</description>
|
||||||
</org.diylc.appframework.update.Change>
|
</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>
|
</changes>
|
||||||
<url>https://github.com/bancika/diy-layout-creator/releases</url>
|
<url>https://github.com/bancika/diy-layout-creator/releases</url>
|
||||||
</org.diylc.appframework.update.Version>
|
</org.diylc.appframework.update.Version>
|
||||||
|
|||||||
Reference in New Issue
Block a user