From a13a3a7f093ec596cf1086001980a06440a9db10 Mon Sep 17 00:00:00 2001 From: Paul Speed Date: Sun, 4 Dec 2016 15:49:51 -0500 Subject: [PATCH] Another bitmap text clone fix. The text pages array (the list of the actual geometry of the bitmap text) wasn't really being cloned... only the elements were. This meant that that a cloned BitmapText object would continue to share the meshes from the original. --- jme3-core/src/main/java/com/jme3/font/BitmapText.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/font/BitmapText.java b/jme3-core/src/main/java/com/jme3/font/BitmapText.java index 57ed33893..e37820b5c 100644 --- a/jme3-core/src/main/java/com/jme3/font/BitmapText.java +++ b/jme3-core/src/main/java/com/jme3/font/BitmapText.java @@ -50,7 +50,7 @@ public class BitmapText extends Node { private BitmapFont font; private StringBlock block; private boolean needRefresh = true; - private final BitmapTextPage[] textPages; + private BitmapTextPage[] textPages; private Letters letters; public BitmapText(BitmapFont font) { @@ -86,6 +86,7 @@ public class BitmapText extends Node { public void cloneFields( Cloner cloner, Object original ) { super.cloneFields(cloner, original); + textPages = textPages.clone(); for( int i = 0; i < textPages.length; i++ ) { textPages[i] = cloner.clone(textPages[i]); }