Skip to content

Commit

Permalink
Merge pull request #3011 from geowar1/Refactoring-LayoutEditor
Browse files Browse the repository at this point in the history
Refactoring LayoutEditor
  • Loading branch information
rhwood committed Feb 7, 2017
2 parents 9510827 + 8d902da commit 84e981c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
4 changes: 2 additions & 2 deletions java/src/jmri/jmrit/display/layoutEditor/LayoutEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ public class LayoutEditor extends jmri.jmrit.display.panelEditor.PanelEditor imp
// note: these only change when setTurnoutCircleSize is called
// using these avoids having to call getTurnoutCircleSize() and
// the multiply (x2) and the int -> double conversion overhead
private double circleRadius = getTurnoutCircleSize();
private double circleRadius = SIZE * getTurnoutCircleSize();
private double circleDiameter = 2.0 * circleRadius;

// selection variables
Expand Down Expand Up @@ -8475,7 +8475,7 @@ public void setTurnoutCircleSize(int size) {
turnoutCircleSize = size;

// these are doubles
circleRadius = size;
circleRadius = SIZE * size;
circleDiameter = 2.0 * circleRadius;

setOptionMenuTurnoutCircleSize();
Expand Down
11 changes: 0 additions & 11 deletions java/src/jmri/jmrit/display/layoutEditor/LayoutTurnout.java
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,6 @@ public class LayoutTurnout extends LayoutTrack {

protected boolean hidden = false;

// note: these only change when setTurnoutCircleSize is called
// using these will avoid having to call getTurnoutCircleSize(),
// the multiply (x2) and the int -> double conversion.
protected double circleRadius = 4; //matches earlier versions
protected double circleDiameter = 2.0 * circleRadius;

private boolean useBlockSpeed = false;

protected LayoutTurnout() {
Expand Down Expand Up @@ -432,11 +426,6 @@ public void setHidden(boolean hide) {
hidden = hide;
}

public void setTurnoutCircleSize(int newSize) {
circleRadius = newSize;
circleDiameter = 2.0 * circleRadius;
}

public String getBlockName() {
return blockName;
}
Expand Down

0 comments on commit 84e981c

Please sign in to comment.