Skip to content

Commit

Permalink
Run UI actions on UI thread
Browse files Browse the repository at this point in the history
  • Loading branch information
oxplot committed Jun 8, 2022
1 parent 4025637 commit a80fc9c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,14 +306,13 @@ func annotate(page int) {
mainStack.SetVisibleChildName("continue-in-inkscape")

go func() {
defer mainWin.SetSensitive(true)
defer mainStack.SetVisibleChildName("pages")

sessMu.Lock()
changed, err := sess.Annotate(page)
sessMu.Unlock()

glib.IdleAdd(func() {
mainWin.SetSensitive(true)
mainStack.SetVisibleChildName("pages")
if err != nil {
showErrMsg("Cannot annotate file", err.Error())
return
Expand Down

0 comments on commit a80fc9c

Please sign in to comment.