Skip to content
Permalink
Browse files

rename private clearLightControls

  • Loading branch information...
icklesteve committed Jun 3, 2019
1 parent b964866 commit ca7caba430532f4444d7d4bfd24e0f5b5e1e9502
Showing with 5 additions and 5 deletions.
  1. +5 −5 java/src/jmri/jmrit/beantable/LightTableAction.java
@@ -1096,8 +1096,8 @@ void createPressed(ActionEvent e) {
return; // without creating
}
// set control information if any
clearLightControlsTable(); // remove all controls from local list
setLightControlInformation(g);
clearLightControls();
g.activateLight();
lightCreatedOrUpdated = true;

@@ -1204,7 +1204,7 @@ void editPressed() {
inEditMode = true;
// get information for this Light
userName.setText(g.getUserName());
clearLightControls();
clearLightControlsTable(); // remove all controls from local list

// Get a copy of the LightControl list
controlList = new ArrayList<>();
@@ -1294,7 +1294,7 @@ private void setLightControlInformation(Light g) {
if (inEditMode && !lightControlChanged) {
return;
}
g.clearLightControls();
g.clearLightControls(); // clear list on Light
for (int i = 0; i < controlList.size(); i++) {
LightControl control = controlList.get(i);
control.setParentLight(g);
@@ -1326,7 +1326,7 @@ void cancelPressed(ActionEvent e) {
if (addFrame != null) {
addFrame.setVisible(false); // hide first for cleaner display
}
clearLightControls();
clearLightControlsTable(); // remove all controls from local list
status2.setText("");
// remind to save, if Light was created or edited
if (lightCreatedOrUpdated) {
@@ -1345,7 +1345,7 @@ void cancelPressed(ActionEvent e) {
}
}

private void clearLightControls() {
private void clearLightControlsTable() {
log.debug("Clear LightControls");
for (int i = controlList.size(); i > 0; i--) {
controlList.remove(i - 1);

0 comments on commit ca7caba

Please sign in to comment.
You can’t perform that action at this time.