Просмотр исходного кода

Bugfix: Quit menu option in editor now properly hooked up

BearishSun 8 лет назад
Родитель
Сommit
499fe5795c
1 измененных файлов с 8 добавлено и 2 удалено
  1. 8 2
      Source/BansheeEditor/EditorWindow/BsMainEditorWindow.cpp

+ 8 - 2
Source/BansheeEditor/EditorWindow/BsMainEditorWindow.cpp

@@ -11,6 +11,7 @@
 #include "Testing/BsTestOutput.h"
 #include "Testing/BsTestOutput.h"
 #include "RenderAPI/BsRenderWindow.h"
 #include "RenderAPI/BsRenderWindow.h"
 #include "CoreThread/BsCoreThread.h"
 #include "CoreThread/BsCoreThread.h"
+#include "BsCoreApplication.h"
 
 
 namespace bs
 namespace bs
 {
 {
@@ -34,7 +35,12 @@ namespace bs
 		updateAreas();
 		updateAreas();
 
 
 		mMenuBar->addMenuItemSeparator(L"File", 10000);
 		mMenuBar->addMenuItemSeparator(L"File", 10000);
-		mMenuBar->addMenuItem(L"File/Exit", nullptr, 10000);
+		mMenuBar->addMenuItem(L"File/Exit", 
+			[]()
+		{
+			gCoreApplication().quitRequested();
+		}, 
+			10000);
 
 
 		SPtr<TestSuite> testSuite = TestSuite::create<EditorTestSuite>();
 		SPtr<TestSuite> testSuite = TestSuite::create<EditorTestSuite>();
 		ExceptionTestOutput testOutput;
 		ExceptionTestOutput testOutput;
@@ -77,4 +83,4 @@ namespace bs
 	{
 	{
 		mDockManager->update();
 		mDockManager->update();
 	}
 	}
-}
+}