From e7e2e1741226a332e3c21844dfdf9411e385d7d1 Mon Sep 17 00:00:00 2001 From: Jonathan Hoffstadt Date: Tue, 11 Aug 2020 23:45:04 -0500 Subject: [PATCH] removed restrictions on menus --- DearPyGui/src/Core/mvMarvel.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/DearPyGui/src/Core/mvMarvel.cpp b/DearPyGui/src/Core/mvMarvel.cpp index fd8b1f448..1d2693467 100644 --- a/DearPyGui/src/Core/mvMarvel.cpp +++ b/DearPyGui/src/Core/mvMarvel.cpp @@ -2884,18 +2884,13 @@ namespace Marvel { &tip, &parent, &before)) return mvPythonTranslator::GetPyNone(); - auto parentItem = mvApp::GetApp()->topParent(); + //auto parentItem = mvApp::GetApp()->topParent(); - if (parentItem == nullptr) - ThrowPythonException("add_menu must follow a call to add_menubar."); + mvAppItem* item = new mvMenu("", name); + item->setTip(tip); + AddItemWithRuntimeChecks(item, parent, before); + mvApp::GetApp()->pushParent(item); - else - { - mvAppItem* item = new mvMenu("", name); - item->setTip(tip); - AddItemWithRuntimeChecks(item, parent, before); - mvApp::GetApp()->pushParent(item); - } return mvPythonTranslator::GetPyNone();