summaryrefslogtreecommitdiff
path: root/cmd/rescribe/gui.go
diff options
context:
space:
mode:
authorNick White <git@njw.name>2022-01-31 17:34:22 +0000
committerNick White <git@njw.name>2022-01-31 17:34:22 +0000
commit70907ee5547cef317e7d6db82a54fce1ed39f998 (patch)
tree72376b39f56bfe71822956ae4bf91f5bfb82b543 /cmd/rescribe/gui.go
parentd0305a56ac19161dad96ca1d97c4a085cf8ea191 (diff)
rescribe: remove unnecessary extra cancel calls; anything which errors should clean up well enough, and this has the potential for more harder to find bugs
Diffstat (limited to 'cmd/rescribe/gui.go')
-rw-r--r--cmd/rescribe/gui.go6
1 files changed, 0 insertions, 6 deletions
diff --git a/cmd/rescribe/gui.go b/cmd/rescribe/gui.go
index d5a132f..8bbb3f5 100644
--- a/cmd/rescribe/gui.go
+++ b/cmd/rescribe/gui.go
@@ -386,8 +386,6 @@ func startGui(log log.Logger, cmd string, training string, tessdir string) error
fmt.Fprintf(os.Stderr, msg)
}
- cancel()
- ctx, cancel = context.WithCancel(context.Background())
progressBar.SetValue(0.0)
for _, v := range []fyne.Disableable{folderBtn, pdfBtn, gbookBtn, trainingOpts, gobtn} {
v.Enable()
@@ -403,8 +401,6 @@ func startGui(log log.Logger, cmd string, training string, tessdir string) error
dialog.ShowError(errors.New(msg), myWindow)
fmt.Fprintf(os.Stderr, msg)
- cancel()
- ctx, cancel = context.WithCancel(context.Background())
progressBar.SetValue(0.0)
for _, v := range []fyne.Disableable{folderBtn, pdfBtn, gbookBtn, trainingOpts, gobtn} {
v.Enable()
@@ -430,8 +426,6 @@ func startGui(log log.Logger, cmd string, training string, tessdir string) error
return
}
if err != nil {
- cancel()
- ctx, cancel = context.WithCancel(context.Background())
msg := fmt.Sprintf("Error during processing: %v\n", err)
dialog.ShowError(errors.New(msg), myWindow)
fmt.Fprintf(os.Stderr, msg)