Pārlūkot izejas kodu

added missing onRemove() after drawTo (close #564)

ncannasse 6 gadi atpakaļ
vecāks
revīzija
96ccc67851
1 mainītis faili ar 4 papildinājumiem un 1 dzēšanām
  1. 4 1
      h2d/Object.hx

+ 4 - 1
h2d/Object.hx

@@ -432,7 +432,10 @@ class Object {
 		var needDispose = s == null;
 		if( s == null ) s = new h2d.Scene();
 		@:privateAccess s.drawImplTo(this, t);
-		if( needDispose ) s.dispose();
+		if( needDispose ) {
+			s.dispose();
+			onRemove();
+		}
 	}
 
 	function draw( ctx : RenderContext ) {