mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-18 00:54:19 +00:00
FileChooser: Fix behaviour of macOS FilePreviewComponent
Previously, when the FileChooser::Native instance entered the modal state, it was preventing the inner FilePreviewComponent from receiving events.
This commit is contained in:
parent
f09b2aa4f5
commit
36664cc487
1 changed files with 5 additions and 2 deletions
|
|
@ -97,11 +97,11 @@ public:
|
|||
if (preview != nullptr)
|
||||
{
|
||||
nsViewPreview = [[NSView alloc] initWithFrame: makeNSRect (preview->getLocalBounds())];
|
||||
[panel setAccessoryView: nsViewPreview];
|
||||
|
||||
preview->addToDesktop (0, (void*) nsViewPreview);
|
||||
preview->setVisible (true);
|
||||
|
||||
[panel setAccessoryView: nsViewPreview];
|
||||
|
||||
if (! isSave)
|
||||
{
|
||||
auto* openPanel = static_cast<NSOpenPanel*> (panel);
|
||||
|
|
@ -187,6 +187,9 @@ public:
|
|||
if (targetComponent == nullptr)
|
||||
return false;
|
||||
|
||||
if (targetComponent == preview)
|
||||
return true;
|
||||
|
||||
return targetComponent->findParentComponentOfClass<FilePreviewComponent>() != nullptr;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue