1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-22 01:34:21 +00:00

FileChooser: Hide chooser when it leaves scope on Windows

This commit is contained in:
reuk 2021-02-26 23:42:47 +00:00
parent e813531d9b
commit 45409bb4e6
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11
9 changed files with 105 additions and 95 deletions

View file

@ -219,11 +219,11 @@ private:
FileChooser::Native* FileChooser::Native::currentFileChooser = nullptr;
FileChooser::Pimpl* FileChooser::showPlatformDialog (FileChooser& owner, int flags,
FilePreviewComponent*)
std::unique_ptr<FileChooser::Pimpl> FileChooser::showPlatformDialog (FileChooser& owner, int flags,
FilePreviewComponent*)
{
if (FileChooser::Native::currentFileChooser == nullptr)
return new FileChooser::Native (owner, flags);
return std::make_unique<FileChooser::Native> (owner, flags);
// there can only be one file chooser on Android at a once
jassertfalse;