修复界面恢复后label无法正常显示名字

main v4.1.0
lensfrex 3 years ago
parent 58d2dbbe62
commit 314cd5b580
Signed by: lensfrex
GPG Key ID: 0F69A0A2FBEE98A0
  1. 1
      Dogename/src/main/java/me/lensferno/dogename/controllers/MainInterfaceController.java
  2. 5
      Dogename/src/main/java/me/lensferno/dogename/controllers/MiniPaneController.java
  3. 4
      Dogename/src/main/java/me/lensferno/dogename/select/Selector.java
  4. 6
      Dogename/src/main/java/me/lensferno/dogename/select/core/Worker.java

@ -144,6 +144,7 @@ public final class MainInterfaceController {
miniPaneController.setCurrentScene(miniScene);
miniPaneController.setListeners();
miniPaneController.setOldTextProperties(upperLabel.textProperty(), downLabel.textProperty());
miniStage.show();
currentStage.hide();

@ -53,9 +53,12 @@ public class MiniPaneController {
this.selector.setLabelTexts(chosenNameLabel.textProperty());
}
public void setOldTextProperties(StringProperty ...stringProperty) {
this.oldTextProperties = stringProperty;
}
@FXML
void recoverMode(ActionEvent event) {
// todo: 待修复:界面恢复后label无法正常显示名字
this.oldStage.setOnShown((e) -> selector.setLabelTexts(oldTextProperties));
this.oldStage.show();

@ -97,9 +97,7 @@ public final class Selector {
}
public void setNumberRange() {
int minNumber = Integer.parseInt(GlobalConfig.mainConfig.getMinNumber());
int maxNumber = Integer.parseInt(GlobalConfig.mainConfig.getMaxNumber());
coreWorker.setNumberRange(minNumber, maxNumber);
coreWorker.setNumberRange();
}
}
}

@ -144,9 +144,9 @@ public final class Worker {
return stoppedIndicator;
}
public void setNumberRange(int minNumber, int maxNumber) {
this.numberRange[MIN_NUMBER] = minNumber;
this.numberRange[MAX_NUMBER] = maxNumber;
public void setNumberRange() {
this.numberRange[MIN_NUMBER] = Integer.parseInt(GlobalConfig.mainConfig.getMinNumber());
this.numberRange[MAX_NUMBER] = Integer.parseInt(GlobalConfig.mainConfig.getMaxNumber());
}
public void setForceStop(boolean forceStop) {

Loading…
Cancel
Save