Skip to content

Commit a80fc9c

Browse files
committed
Run UI actions on UI thread
1 parent 4025637 commit a80fc9c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

main.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,14 +306,13 @@ func annotate(page int) {
306306
mainStack.SetVisibleChildName("continue-in-inkscape")
307307

308308
go func() {
309-
defer mainWin.SetSensitive(true)
310-
defer mainStack.SetVisibleChildName("pages")
311-
312309
sessMu.Lock()
313310
changed, err := sess.Annotate(page)
314311
sessMu.Unlock()
315312

316313
glib.IdleAdd(func() {
314+
mainWin.SetSensitive(true)
315+
mainStack.SetVisibleChildName("pages")
317316
if err != nil {
318317
showErrMsg("Cannot annotate file", err.Error())
319318
return

0 commit comments

Comments
 (0)