1
0
Fork 0
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:
hogliux 2018-04-09 14:35:04 +01:00
parent 7a1937b0da
commit b4da4539f1

View file

@ -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)
};