Fix circular tab window layout (fix #700)

This commit is contained in:
1024jp 2017-05-06 16:10:10 +09:00
parent cdbdd10172
commit 6d2c7ad440
3 changed files with 9 additions and 8 deletions

View File

@ -42,6 +42,7 @@ develop
### Fixes
- Fix an issue where the application could hang up when lots of tabbed windows are about open.
- Fix an issue where the selections after “Replace All” in selection shifted one character.
- Fix an issue where the document syntax style could be back to the default if the current style was set manually and document was modified in another process.
- Fix an issue where the status bar stopped updating after toggling the inspector sidebar.

View File

@ -9,7 +9,7 @@
------------------------------------------------------------------------------
© 2016 1024jp
© 2016-2017 1024jp
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -99,6 +99,8 @@ final class SidebarViewController: NSTabViewController {
override var selectedTabViewItemIndex: Int {
didSet {
guard selectedTabViewItemIndex != oldValue else { return }
self.delegate?.tabViewController(self, didSelect: self.selectedTabViewItemIndex)
}
}

View File

@ -9,7 +9,7 @@
------------------------------------------------------------------------------
© 2016 1024jp
© 2016-2017 1024jp
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -115,8 +115,8 @@ final class WindowContentViewController: NSSplitViewController, TabViewControlle
{
self.isSynchronizingTabs = true
self.siblings.lazy
.filter { $0 != self }
self.siblings.filter { $0 != self }
.filter { $0.splitView.frame.width != position }
.forEach { $0.splitView.setPosition(position, ofDividerAt: 0) }
self.isSynchronizingTabs = false
@ -135,8 +135,7 @@ final class WindowContentViewController: NSSplitViewController, TabViewControlle
self.isSynchronizingTabs = true
self.siblings.lazy
.filter { $0 != self }
self.siblings.filter { $0 != self }
.forEach { $0.sidebarViewController?.selectedTabViewItemIndex = tabViewIndex }
self.isSynchronizingTabs = false
@ -241,8 +240,7 @@ final class WindowContentViewController: NSSplitViewController, TabViewControlle
self.sidebarViewItem?.isCollapsed = !shown
// and then update background tabs
self.siblings.lazy
.filter { $0 != self }
self.siblings.filter { $0 != self }
.forEach {
$0.sidebarViewItem?.isCollapsed = !shown
$0.sidebarThickness = self.sidebarThickness