Bug 413241 - Operations that use system dialog to choose files fail
Summary: Operations that use system dialog to choose files fail
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: 4.2.7.1
Platform: Other macOS
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-20 15:32 UTC by magolorsoulddd
Modified: 2019-11-15 10:36 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description magolorsoulddd 2019-10-20 15:32:21 UTC
SUMMARY
Open, Save As, and Export don't work, but Save does work. When I use the first three, my system dialog (Finder) pops up. When I choose a file or filename and click Open or Save, the dialog box closes as usual. However, if I Open a file, nothing happens. If I Save As or Export, Krita's dialog for setting file saving options doesn't pop up. I can then edit my current project as usual.

STEPS TO REPRODUCE (Open a file)
1. Open Krita. Go to File in menu bar and choose Open.
2. System dialog appears; choose an image file and click the Open button. (This is the blue button in the lower right corner if using MacOS.)

OBSERVED RESULT (Open a file)
System dialog box closes, but Krita doesn't load in the image and remains on the welcome screen.

EXPECTED RESULT (Open a file)
System dialog box closes and Krita loads the image.


STEPS TO REPRODUCE (Save As or Export)
1. Open Krita. Open an image file (I had to drag and drop).
2. Go to the menu bar and choose Export or Save As.
3. System dialog appears; choose a file name and and file type to save to.
4. Click the Save button (blue button in lower right if using MacOS).

OBSERVED RESULT (Save As or Export)
System dialog box closes. Krita's dialog box of file saving options doesn't pop up. The image I have open remains editable and Krita otherwise works normally.

EXPECTED RESULT (Save As or Export)
System dialog box closes. Krita's dialog box of file saving options appears and allows my to choose options such as Store Metadata. If I then click the Save button, the Krita saves the file with the intended filename and filetype.

SOFTWARE/OS VERSIONS
macOS: 10.15 Catalina

ADDITIONAL INFORMATION
For opening files, I've tested JPEG and PNG files. For Save As and Export, I've tested JPEG, PNG, and KRA filetypes.
If I use the regular Save operation to overwrite the file I opened first, Krita's dialog for saving options pops up normally because Save doesn't let me to choose a filename or filetype.
If I open a file by dragging it into the Krita window rather than using the Open operation from the menu bar, Krita loads in the image normally.
I'm using MacOS 10.15, so this bug is probably specific to my operating system. I'm guessing not many people use 10.15, so this will probably be difficult for others to confirm.
Comment 1 Halla Rempt 2019-10-20 15:46:59 UTC
I guess that this is another of the "security" things in Catalina when running a non-notarized application. Damn Apple to the ninth circle of the hell... I'm trying to work out how to notarize Krita, but the documentation is incomplete and unclear, and the when actually trying to run the script, the error messages are even more incomplete and unclear.
Comment 2 Halla Rempt 2019-10-20 15:50:02 UTC
Oh, and if you disable "native file dialogs" in krita's settings, does it work then? I don't have Catalina yet myself, and anyway, since I've got only one mac, I can always run what I build myself...
Comment 3 magolorsoulddd 2019-10-20 17:44:00 UTC
Disabling native file dialogs works. Thank you!
Comment 4 Halla Rempt 2019-10-20 18:26:06 UTC
Thanks foor checking!
Comment 5 Halla Rempt 2019-10-21 07:44:17 UTC
I'll mark this bug as a duplicate of 409673. We're working on this: https://invent.kde.org/kde/krita/merge_requests/164#note_16052

*** This bug has been marked as a duplicate of bug 409673 ***
Comment 6 Halla Rempt 2019-11-05 16:36:00 UTC
Now that we notarize the build, this still fails. Weird Apple, to put the checks for saving permission in the _file dialog_. I'll close the other bug and reopen this one.
Comment 7 vanyossi 2019-11-11 02:35:18 UTC
Git commit e27ab3a7382dcf3c6f877d6c949dc13c550539f7 by Ivan Yossi.
Committed on 11/11/2019 at 02:34.
Pushed by ivany into branch 'master'.

Fix native dialog save/open on macos 10.15

If native FileDialog is set as "modal" the dialog exec
method will always return "0".

Is we are in macOS and Native FileDialog is set we
avoid setting the dialog as Modal as native FileDialog
in macOS always behave as a Modal Dialog

M  +0    -3    libs/ui/dialogs/kis_dlg_preferences.cc
M  +11   -3    libs/widgetutils/KoFileDialog.cpp

https://invent.kde.org/kde/krita/commit/e27ab3a7382dcf3c6f877d6c949dc13c550539f7
Comment 8 Halla Rempt 2019-11-15 10:36:11 UTC
Git commit cc85059243ada09d0d293b4b369c0318c665718b by Boudewijn Rempt, on behalf of Ivan Yossi.
Committed on 15/11/2019 at 10:10.
Pushed by rempt into branch 'krita/4.2'.

Fix native dialog save/open on macos 10.15

If native FileDialog is set as "modal" the dialog exec
method will always return "0".

Is we are in macOS and Native FileDialog is set we
avoid setting the dialog as Modal as native FileDialog
in macOS always behave as a Modal Dialog
(cherry picked from commit e27ab3a7382dcf3c6f877d6c949dc13c550539f7)

M  +11   -2    libs/widgetutils/KoFileDialog.cpp

https://invent.kde.org/kde/krita/commit/cc85059243ada09d0d293b4b369c0318c665718b