mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-22 01:34:21 +00:00
AAX: Fixed an issue when ProTools refuses to accept the size requested by the plug-in
This commit is contained in:
parent
7a1937b0da
commit
b4da4539f1
1 changed files with 14 additions and 3 deletions
|
|
@ -530,7 +530,8 @@ namespace AAXClasses
|
|||
|
||||
if (pluginEditor != nullptr)
|
||||
{
|
||||
setBounds (pluginEditor->getLocalBounds());
|
||||
lastValidSize = pluginEditor->getLocalBounds();
|
||||
setBounds (lastValidSize);
|
||||
pluginEditor->addMouseListener (this, true);
|
||||
}
|
||||
|
||||
|
|
@ -579,10 +580,19 @@ namespace AAXClasses
|
|||
{
|
||||
auto w = pluginEditor->getWidth();
|
||||
auto h = pluginEditor->getHeight();
|
||||
setSize (w, h);
|
||||
|
||||
AAX_Point newSize ((float) h, (float) w);
|
||||
owner.GetViewContainer()->SetViewSize (newSize);
|
||||
|
||||
if (owner.GetViewContainer()->SetViewSize (newSize) == AAX_SUCCESS)
|
||||
{
|
||||
setSize (w, h);
|
||||
lastValidSize = getBounds();
|
||||
}
|
||||
else
|
||||
{
|
||||
auto validSize = pluginEditor->getBounds().withSize (lastValidSize.getWidth(), lastValidSize.getHeight());
|
||||
pluginEditor->setBoundsConstrained (validSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -593,6 +603,7 @@ namespace AAXClasses
|
|||
WindowsHooks hooks;
|
||||
#endif
|
||||
FakeMouseMoveGenerator fakeMouseGenerator;
|
||||
Rectangle<int> lastValidSize;
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ContentWrapperComponent)
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue