Преглед изворни кода

Fix Button 3D content swap

Sebastien Vandenberghe пре 5 година
родитељ
комит
69be5814e0
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      gui/src/3D/controls/button3D.ts

+ 3 - 0
gui/src/3D/controls/button3D.ts

@@ -124,6 +124,9 @@ export class Button3D extends AbstractButton3D {
             this._facadeTexture.rootContainer.scaleY = this._contentScaleRatio;
             this._facadeTexture.premulAlpha = true;
         }
+        else {
+            this._facadeTexture.rootContainer.clearControls();
+        }
 
         this._facadeTexture.addControl(value);