Skip to content

Commit

Permalink
features/rearrange-columns: if only one column remains, might as well…
Browse files Browse the repository at this point in the history
… close the sheet
  • Loading branch information
Sören Kuklau committed Apr 6, 2024
1 parent efa6fee commit a52a6c0
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,14 @@ class ArrangeColumnsWindowController: NSWindowController, NSCollectionViewDelega

return true
}

func reloadData() {
collectionView.reloadData()

// if only one column remains, there's nothing left for the user to do in the sheet
if let viewControllers = getColumnViewControllers?(), viewControllers.count == 1 {
close()
}
}

@IBAction func done(_ sender: Any) {
Expand Down

0 comments on commit a52a6c0

Please sign in to comment.