Select next item in Sidebar on delete. Issue #2114

This commit is contained in:
Maurice Parker 2020-07-10 16:49:10 -05:00
parent 3215c98253
commit 4af8e0ab1c
1 changed files with 4 additions and 0 deletions

View File

@ -223,7 +223,11 @@ protocol SidebarDelegate: class {
if outlineView.selectionIsEmpty {
return
}
let firstRow = outlineView.selectedRowIndexes.min()
deleteNodes(selectedNodes)
if let restoreRow = firstRow, restoreRow < outlineView.numberOfRows {
outlineView.selectRow(restoreRow)
}
}
@IBAction func doubleClickedSidebar(_ sender: Any?) {