修复重置显示问题

This commit is contained in:
octopusYan 2022-04-16 12:31:10 +08:00
parent 4b0c793e42
commit 9bd945f02b

View File

@ -348,13 +348,13 @@ public class MainController extends BaseController<StackPane> implements Initial
serverProviderRBtn.setSelected(false);
serverVisitorRBtn.setSelected(false);
proxySetupModel.isProvider = null;
} else if (oldValue == null) {
if (proxySetupModel.isProvider == null) {
proxySetupModel.isProvider = proxySetupModel.isProvider();
}
serverProviderRBtn.setSelected(proxySetupModel.isProvider);
serverVisitorRBtn.setSelected(!proxySetupModel.isProvider);
return;
}
boolean isProvider = newValue.equals("提供者");
serverProviderRBtn.setSelected(isProvider);
serverVisitorRBtn.setSelected(!isProvider);
proxySetupModel.isProvider = isProvider;
});
serverRoleGroup.selectedToggleProperty().addListener((observable, oldValue, newValue) -> {
if (newValue == null) return;