Josh Engebretson 11 лет назад
Родитель
Сommit
b81b4424c4
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      Source/AtomicEditor/Source/UI/UIProjectFrame.cpp

+ 4 - 2
Source/AtomicEditor/Source/UI/UIProjectFrame.cpp

@@ -372,8 +372,10 @@ bool ProjectFrame::OnEvent(const TBWidgetEvent &ev)
 
         if (ev.target->GetID() == TBIDC("menu create"))
         {
-            if (TBMenuWindow *menu = new TBMenuWindow(ev.target, TBIDC("create popup")))
-                menu->Show(&menuCreateSource, TBPopupAlignment());
+            TBUI* tbui = GetSubsystem<TBUI>();
+            if (!tbui->GetRootWidget()->GetWidgetByID(TBIDC("create popup")))
+                if (TBMenuWindow *menu = new TBMenuWindow(ev.target, TBIDC("create popup")))
+                    menu->Show(&menuCreateSource, TBPopupAlignment());
 
             return true;
         }