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

Fix event listener not being removed properly in Scene destructor

Ivan Safrin 11 лет назад
Родитель
Сommit
8486ff0a5a
2 измененных файлов с 2 добавлено и 1 удалено
  1. 1 0
      Core/Contents/Source/PolyScene.cpp
  2. 1 1
      IDE/Contents/Source/PolycodeMaterialEditor.cpp

+ 1 - 0
Core/Contents/Source/PolyScene.cpp

@@ -145,6 +145,7 @@ void Scene::fixedUpdate() {
 
 
 Scene::~Scene() {
 Scene::~Scene() {
 	core->getInput()->removeAllHandlersForListener(this);
 	core->getInput()->removeAllHandlersForListener(this);
+    core->removeAllHandlersForListener(this);
 	CoreServices::getInstance()->getSceneManager()->removeScene(this);	
 	CoreServices::getInstance()->getSceneManager()->removeScene(this);	
 	delete defaultCamera;
 	delete defaultCamera;
 }
 }

+ 1 - 1
IDE/Contents/Source/PolycodeMaterialEditor.cpp

@@ -53,7 +53,7 @@ PostEditorPane::PostEditorPane(ResourcePool *resourcePool) : UIElement() {
 	baseProps->addProp(fp16Prop);
 	baseProps->addProp(fp16Prop);
 	fp16Prop->addEventListener(this, Event::CHANGE_EVENT);
 	fp16Prop->addEventListener(this, Event::CHANGE_EVENT);
 		
 		
-	baseProps->propHeight = 100;	
+	baseProps->propHeight = 300;
 
 
 	targetsProps = new RenderTargetsSheet();
 	targetsProps = new RenderTargetsSheet();
 	propList->addPropSheet(targetsProps);
 	propList->addPropSheet(targetsProps);