Use the menu.takeItems method.

This commit is contained in:
Brent Simmons 2018-02-09 22:10:52 -08:00
parent c77866c4d7
commit 46cae22987
1 changed files with 2 additions and 5 deletions

View File

@ -7,6 +7,7 @@
//
import AppKit
import RSCore
@objc final class SidebarContextualMenuDelegate: NSObject, NSMenuDelegate {
@ -24,11 +25,7 @@ import AppKit
return
}
let items = contextualMenu.items
contextualMenu.removeAllItems()
for menuItem in items {
menu.addItem(menuItem)
}
menu.takeItems(from: contextualMenu)
}
}