Fix direction to close sidebar

This commit is contained in:
1024jp 2018-04-15 00:01:32 +09:00
parent 2caa0019d1
commit 2f22e03650
2 changed files with 11 additions and 0 deletions

View File

@ -2,6 +2,15 @@
Change Log
==========================
unreleased
--------------------------
### Fixes
- Fix an issue where the sidebar inspector did close inward when the pane was switched after opening the sidebar outward.
3.4.0-beta.2 (243)
--------------------------

View File

@ -204,6 +204,8 @@ final class WindowContentViewController: NSSplitViewController, TabViewControlle
return !(self.sidebarViewItem?.isCollapsed ?? true)
}
set (shown) {
guard shown != self.isSidebarShown else { return }
// close sidebar inward if it opened so (because of insufficient space to open outward)
let currentWidth = self.splitView.frame.width
NSAnimationContext.current.completionHandler = {