Implement logic for canPropagate...

This commit is contained in:
Gregory John Casamento 2020-07-28 09:10:20 -04:00
parent bc802f3833
commit 09f022fa14
2 changed files with 13 additions and 0 deletions

View file

@ -121,6 +121,14 @@
- (void) setSelectedTabViewItemIndex: (NSInteger)idx
{
[[self tabView] selectTabViewItemAtIndex: idx];
if (_canPropagateSelectedChildViewControllerTitle)
{
NSString *title = [[[self tabView] tabViewItems] objectAtIndex: idx];
if (title != nil)
{
[self setTitle: title];
}
}
}
// Responding to tabview actions...

View file

@ -84,6 +84,11 @@
- (void)setTitle:(NSString *)title
{
NSWindow *w = [[self view] window];
if (w != nil)
{
[w setTitle: title]; // sync title with window...
}
ASSIGN(_title, title);
}