1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

PopupMenu: Add withMousePosition helper function to Options

This commit is contained in:
reuk 2021-09-08 18:35:04 +01:00
parent 84c5627b42
commit ab966fb499
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11
4 changed files with 24 additions and 10 deletions

View file

@ -1713,7 +1713,8 @@ private:
if (e.mods.isRightButtonDown())
if (auto* c = editor.getHostContext())
if (auto menuInfo = c->getContextMenuForParameterIndex (&param))
menuInfo->getEquivalentPopupMenu().showMenuAsync ({});
menuInfo->getEquivalentPopupMenu().showMenuAsync (PopupMenu::Options{}.withTargetComponent (this)
.withMousePosition());
}
private: