Expand group items by default. Fix #187.

This commit is contained in:
Brent Simmons 2017-11-18 17:10:47 -08:00
parent 23ae585b12
commit 197ceefea9
1 changed files with 13 additions and 0 deletions

View File

@ -36,6 +36,19 @@ import RSCore
NotificationCenter.default.addObserver(self, selector: #selector(batchUpdateDidPerform(_:)), name: .BatchUpdateDidPerform, object: nil)
outlineView.reloadData()
// Always expand all group items on initial display.
var row = 0
while(true) {
guard let item = outlineView.item(atRow: row) else {
break
}
let node = item as! Node
if node.isGroupItem {
outlineView.expandItem(item)
}
row += 1
}
}
//MARK: Notifications