aboutsummaryrefslogtreecommitdiff
path: root/src/ui/components/Menu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/components/Menu.cpp')
-rw-r--r--src/ui/components/Menu.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ui/components/Menu.cpp b/src/ui/components/Menu.cpp
index c6be942a..ea1afc07 100644
--- a/src/ui/components/Menu.cpp
+++ b/src/ui/components/Menu.cpp
@@ -78,8 +78,7 @@ void Menu::AddTextItemAt(std::string text, Index index,
PopupMenu::PopupMenu(controls::Control* attached_control)
: attached_control_(attached_control) {
menu_.SetOnItemClick([this](Index) { popup_->GetNativeWindow()->Close(); });
- popup_.reset(controls::Window::CreatePopup());
- popup_->SetAttachedControl(attached_control);
+ popup_.reset(controls::Window::CreatePopup(attached_control));
popup_->InsertChildAt(menu_.GetRootControl(), 0);
}