From 8dd3301c43669cff5f2ede41e5ff774cc1303eb4 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 21 Dec 2020 16:52:16 +0100 Subject: [PATCH] text: Fix issue with TextNode::set_text() called from non-App stage Because TextEncoder is not pipeline-cycled, text_changed() should propagate text changes up to stage 0. See #1070; this caused the frame rate meter to show 0.0 fps most of the frames. --- panda/src/text/textNode.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panda/src/text/textNode.cxx b/panda/src/text/textNode.cxx index 5050caf624..be904d7972 100644 --- a/panda/src/text/textNode.cxx +++ b/panda/src/text/textNode.cxx @@ -341,7 +341,7 @@ void TextNode:: text_changed() { // Copy the text to this class, since TextEncoder doesn't store it in a // pipeline-cycled manner. - CDWriter cdata(_cycler); + CDWriter cdata(_cycler, true); cdata->_text = TextEncoder::get_text(); cdata->_wtext = TextEncoder::get_wtext(); invalidate_with_measure(cdata);