mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-01-18 10:46:33 +00:00
fix a case where the "Allow Default" checkbox would be enabled when a network wasn't connected.
This commit is contained in:
parent
58207b30d1
commit
fe725f9995
@ -79,7 +79,21 @@ class ShowNetworksViewController: NSViewController, NSTableViewDelegate, NSTable
|
|||||||
if network.connected {
|
if network.connected {
|
||||||
cell.connectedCheckbox.state = NSOnState
|
cell.connectedCheckbox.state = NSOnState
|
||||||
|
|
||||||
cell.allowDefault.enabled = true
|
if network.allowDefault {
|
||||||
|
cell.allowDefault.enabled = true
|
||||||
|
cell.allowDefault.state = NSOnState
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
cell.allowDefault.state = NSOffState
|
||||||
|
|
||||||
|
if defaultRouteExists(networkList) {
|
||||||
|
cell.allowDefault.enabled = false
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
cell.allowDefault.enabled = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
cell.allowGlobal.enabled = true
|
cell.allowGlobal.enabled = true
|
||||||
cell.allowManaged.enabled = true
|
cell.allowManaged.enabled = true
|
||||||
}
|
}
|
||||||
@ -91,21 +105,6 @@ class ShowNetworksViewController: NSViewController, NSTableViewDelegate, NSTable
|
|||||||
cell.allowManaged.enabled = false
|
cell.allowManaged.enabled = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if network.allowDefault {
|
|
||||||
cell.allowDefault.state = NSOnState
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
cell.allowDefault.state = NSOffState
|
|
||||||
|
|
||||||
if defaultRouteExists(networkList) {
|
|
||||||
cell.allowDefault.enabled = false
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
cell.allowDefault.enabled = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
cell.allowGlobal.state = (network.allowGlobal ? NSOnState : NSOffState)
|
cell.allowGlobal.state = (network.allowGlobal ? NSOnState : NSOffState)
|
||||||
cell.allowManaged.state = (network.allowManaged ? NSOnState : NSOffState)
|
cell.allowManaged.state = (network.allowManaged ? NSOnState : NSOffState)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user