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

Fixed a bug setting PopupMenu parents via a LookAndFeel

This commit is contained in:
Tom Poole 2018-09-03 11:57:39 +01:00
parent 472cd5a984
commit 38fd441a95

View file

@ -211,10 +211,10 @@ struct MenuWindow : public Component
setLookAndFeel (parent != nullptr ? &(parent->getLookAndFeel())
: menu.lookAndFeel.get());
auto& lf = getLookAndFeel();
parentComponent = lf.getParentComponentForMenuOptions (options);
const_cast<Options&>(options) = options.withParentComponent (parentComponent);
if (parentComponent == nullptr && parentWindow == nullptr && lf.shouldPopupMenuScaleWithTargetComponent (options))
if (auto* targetComponent = options.getTargetComponent())