Skip to content

Commit

Permalink
Fixed side-views being empty after animating on 10.13
Browse files Browse the repository at this point in the history
  • Loading branch information
swisspol committed Feb 10, 2018
1 parent 82bc229 commit bede5c5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions GitUp/Application/Document.m
Original file line number Diff line number Diff line change
Expand Up @@ -1700,6 +1700,7 @@ - (void)_addSideView:(NSView*)view withIdentifier:(NSString*)identifier completi
view.frame = NSOffsetRect(newViewFrame, viewFrame.size.width, 0);
[_mapContainerView addSubview:view positioned:NSWindowAbove relativeTo:_mapView];

#if 0 // TODO: On 10.13, the first time the view is shown after animating, it is completely empty
[NSAnimationContext beginGrouping];
[[NSAnimationContext currentContext] setDuration:kSideViewAnimationDuration];
if (completion) {
Expand All @@ -1710,6 +1711,13 @@ - (void)_addSideView:(NSView*)view withIdentifier:(NSString*)identifier completi
[_mapView.animator setFrame:newMapFrame];
[view.animator setFrame:newViewFrame];
[NSAnimationContext endGrouping];
#else
[_mapView setFrame:newMapFrame];
[view setFrame:newViewFrame];
if (completion) {
completion();
}
#endif
[self _updateToolBar];

[self _showHelpWithIdentifier:identifier];
Expand Down

0 comments on commit bede5c5

Please sign in to comment.