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

Allow mouse events to pass to FilePreviewComponent in native file choosers

This commit is contained in:
ed 2018-11-30 14:28:06 +00:00
parent aee19ad963
commit e5d1e0008e
2 changed files with 16 additions and 0 deletions

View file

@ -188,6 +188,14 @@ public:
finished (result);
}
bool canModalEventBeSentToComponent (const Component* targetComponent) override
{
if (targetComponent == nullptr)
return false;
return targetComponent->findParentComponentOfClass<FilePreviewComponent>() != nullptr;
}
private:
//==============================================================================
#if defined (MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6

View file

@ -558,6 +558,14 @@ public:
owner.finished (nativeFileChooser->results);
}
bool canModalEventBeSentToComponent (const Component* targetComponent) override
{
if (targetComponent == nullptr)
return false;
return targetComponent->findParentComponentOfClass<FilePreviewComponent>() != nullptr;
}
private:
FileChooser& owner;
Win32NativeFileChooser::Ptr nativeFileChooser;