In my application I have a NSCollectionView with a custom CollectionViewItem. It is used to display images. I have the option "Allow Multiple Selection" active and can select several items with the mouse.
However, for NSCollectionView I also have a ContextMenu that opens when I right-click. However, if I click on an item, my selection is lost. Only the item I clicked on will be marked. I don't want that. I want to open the context menu and keep the selection of several items. This only works if I click between two items instead on an item.
How can I prevent the selection by right-clicking on an item?
UPDATE
The context menu is implemented via the Interface Builder. I dragged it on the ViewController on connected it with the menu outlet from the CollectionView.