Select next item in Sidebar on delete. Issue #2114
This commit is contained in:
parent
3215c98253
commit
4af8e0ab1c
|
@ -223,7 +223,11 @@ protocol SidebarDelegate: class {
|
||||||
if outlineView.selectionIsEmpty {
|
if outlineView.selectionIsEmpty {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
let firstRow = outlineView.selectedRowIndexes.min()
|
||||||
deleteNodes(selectedNodes)
|
deleteNodes(selectedNodes)
|
||||||
|
if let restoreRow = firstRow, restoreRow < outlineView.numberOfRows {
|
||||||
|
outlineView.selectRow(restoreRow)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@IBAction func doubleClickedSidebar(_ sender: Any?) {
|
@IBAction func doubleClickedSidebar(_ sender: Any?) {
|
||||||
|
|
Loading…
Reference in New Issue