Support MacVST2 plugins with multiple child views (e.g. UAD)
This commit is contained in:
parent
b6c75ef42a
commit
2e7b193988
@ -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) */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user