mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
PopupMenu: Add missing target components for menus created by built-in widgets
This commit is contained in:
parent
336a475921
commit
b20df8d713
6 changed files with 14 additions and 9 deletions
|
|
@ -829,7 +829,7 @@ private:
|
|||
setContentOwned (content, resizeAutomatically);
|
||||
}
|
||||
|
||||
void buttonClicked (Button*) override
|
||||
void buttonClicked (Button* button) override
|
||||
{
|
||||
PopupMenu m;
|
||||
m.addItem (1, TRANS ("Audio/MIDI Settings..."));
|
||||
|
|
@ -839,7 +839,7 @@ private:
|
|||
m.addSeparator();
|
||||
m.addItem (4, TRANS ("Reset to default state"));
|
||||
|
||||
m.showMenuAsync (PopupMenu::Options(),
|
||||
m.showMenuAsync (PopupMenu::Options().withTargetComponent (button),
|
||||
ModalCallbackFunction::forComponent (menuCallback, this));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue