mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
WindowController: Make sure the subview is the right size before adding it
This fixes a rendering bug when you start in commit view and then switch to History view.
This commit is contained in:
@@ -62,7 +62,8 @@
|
||||
viewController = [[PBGitCommitController alloc] initWithRepository:repository superController:self];
|
||||
}
|
||||
|
||||
|
||||
// make sure we automatically resize the controller's view to the current window size
|
||||
[[viewController view] setFrame: [contentView bounds]];
|
||||
|
||||
//// embed the current view to our host view
|
||||
[contentView addSubview: [viewController view]];
|
||||
@@ -72,8 +73,6 @@
|
||||
if ([viewController respondsToSelector:@selector(commitController)])
|
||||
[self bind:@"searchController" toObject:viewController withKeyPath:@"commitController" options:nil];
|
||||
|
||||
// make sure we automatically resize the controller's view to the current window size
|
||||
[[viewController view] setFrame: [contentView bounds]];
|
||||
|
||||
[self didChangeValueForKey:@"viewController"]; // this will trigger the NSTextField's value binding to change
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user