ChiriVulpes / MagicTranslator

Turning scanlation into a magical experience ✨
4 stars 1 forks source link

When ImageMagick path is not set, and no translated image is in the translated folder, the "do you want to set a path to ImageMagick" popup appears twice #136

Closed milleniumbug closed 1 year ago

milleniumbug commented 3 years ago

Like in the title. The popup appears twice, so if user picks "No", they have to press it twice, and if they select "Yes" and go and pick the path, they still have to dismiss it the second time.

(side note: picking "No" is pointless since the program will keep asking for it whenever we switch modes or go to previous/next page - we may go with a less intrusive option, like showing a different text in the place where a page is supposed to be)

The first time the popup is triggered is in the constructor, which calls this.setPageImage(), which calls this.initializePageImage(translatedPath)

The second time the popup is triggered when changeDisplayMode is called, it calls this.setPageImage(), and that one calls this.initializePageImage(translatedPath).

changeDisplayMode is triggered by an event, apparently.