Browse Source

Set the parent component of a PopupMenu submenu in showSubMenuFor()

tags/2021-05-28
ed 7 years ago
parent
commit
82a0dceaa5
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      modules/juce_gui_basics/menus/juce_PopupMenu.cpp

+ 2
- 1
modules/juce_gui_basics/menus/juce_PopupMenu.cpp View File

@@ -912,7 +912,8 @@ struct MenuWindow : public Component
activeSubMenu.reset (new HelperClasses::MenuWindow (*(childComp->item.subMenu), this,
options.withTargetScreenArea (childComp->getScreenBounds())
.withMinimumWidth (0)
.withTargetComponent (nullptr),
.withTargetComponent (nullptr)
.withParentComponent (parentComponent),
false, dismissOnMouseUp, managerOfChosenCommand, scaleFactor));
activeSubMenu->setVisible (true); // (must be called before enterModalState on Windows to avoid DropShadower confusion)


Loading…
Cancel
Save