Skip to content

Commit

Permalink
#15 cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mikan committed Jan 27, 2021
1 parent 67eec25 commit b22900f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ui_ip2mac.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ func newIP2MACTab(w fyne.Window, adapters []adapter) fyne.CanvasObject {
adapterEntry.SetText(adapterNames[0])
}
adapterEntry.Disable()
adapterAuto := true
adapterAutoCheck := widget.NewCheck("Auto", func(checked bool) {
adapterAuto = checked
if checked {
adapterEntry.Disable()
} else {
Expand Down Expand Up @@ -54,7 +52,7 @@ func newIP2MACTab(w fyne.Window, adapters []adapter) fyne.CanvasObject {
}()
var mac string
var err error
if adapterAuto {
if adapterAutoCheck.Checked {
mac, err = ip2macWithoutAdapterSelect(ipEntry.Text)
} else {
mac, err = ip2mac(ipEntry.Text, findAdapter(adapters, adapterEntry.Text))
Expand Down

0 comments on commit b22900f

Please sign in to comment.