Clean and fix, don't load file if no file selected

pull/3/head
Minizbot2012 4 years ago
parent d613f46024
commit 84ac33e721
No known key found for this signature in database
GPG Key ID: 977C8ADE12361917

@ -42,7 +42,6 @@ func LoadFile(file string) *PKM {
b := make([]byte, 2)
inf.Read(b)
Asc := keys.GetASCIIForSC(int(binary.LittleEndian.Uint16(b)))
log.Println(Asc)
if i < 26 {
if i < 20 {
mapped.MIP[i] = Asc

@ -27,9 +27,11 @@ func main() {
}, window)
}), fyne.NewMenuItem("Load", func() {
dialog.ShowFileOpen(func(p string) {
omap = orbweaver.LoadFile(p)
nmp.SetBindings(omap)
nsp.SetBindings(omap)
if p != "" {
omap = orbweaver.LoadFile(p)
nmp.SetBindings(omap)
nsp.SetBindings(omap)
}
}, window)
}))))
window.SetContent(tabs)

Loading…
Cancel
Save