13
0

Support MacVST2 plugins with multiple child views (e.g. UAD)

This commit is contained in:
Robin Gareus 2021-04-28 00:57:41 +02:00
parent b6c75ef42a
commit 2e7b193988
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -95,12 +95,12 @@ MacVSTPluginUI::MacVSTPluginUI (boost::shared_ptr<PluginInsert> pi, boost::share
object:_ns_view]; object:_ns_view];
NSArray* subviews = [_ns_view subviews]; NSArray* subviews = [_ns_view subviews];
assert ([subviews count] < 2);
for (unsigned long i = 0; i < [subviews count]; ++i) { for (unsigned long i = 0; i < [subviews count]; ++i) {
NSView* subview = [subviews objectAtIndex:i]; NSView* subview = [subviews objectAtIndex:i];
[[NSNotificationCenter defaultCenter] addObserver:_resize_notifier [[NSNotificationCenter defaultCenter] addObserver:_resize_notifier
selector:@selector(viewResized:) name:NSViewFrameDidChangeNotification selector:@selector(viewResized:) name:NSViewFrameDidChangeNotification
object:subview]; object:subview];
break; /* only watch first subview (if any) */
} }
} }