mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-14 00:14:18 +00:00
macOS: Always resize embedded NSView asynchronously in AutoResizingNSViewComponent to fix a bug with some AU plug-ins reporting the incorrect size
This commit is contained in:
parent
ceec72457d
commit
1bea6b517d
1 changed files with 2 additions and 17 deletions
|
|
@ -93,23 +93,8 @@ static inline bool arrayContainsPlugin (const OwnedArray<PluginDescription>& lis
|
|||
struct AutoResizingNSViewComponent : public ViewComponentBaseClass,
|
||||
private AsyncUpdater
|
||||
{
|
||||
void childBoundsChanged (Component*) override
|
||||
{
|
||||
if (recursive)
|
||||
{
|
||||
triggerAsyncUpdate();
|
||||
}
|
||||
else
|
||||
{
|
||||
recursive = true;
|
||||
resizeToFitView();
|
||||
recursive = false;
|
||||
}
|
||||
}
|
||||
|
||||
void handleAsyncUpdate() override { resizeToFitView(); }
|
||||
|
||||
bool recursive = false;
|
||||
void childBoundsChanged (Component*) override { triggerAsyncUpdate(); }
|
||||
void handleAsyncUpdate() override { resizeToFitView(); }
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue