From fa73657d032d47013e8fcc4283b78dcd1b74dc34 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 31 Mar 2021 17:26:40 +0200 Subject: [PATCH] pgui: Revert part of f2e488fd6b39a6fca54c0be79378955157a266de This caused a regression due to a removal of update_frame invocation in single-threaded pipeline, needs to be revisited later on master branch --- panda/src/pgui/pgItem.cxx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/panda/src/pgui/pgItem.cxx b/panda/src/pgui/pgItem.cxx index 74201d01b0..1ad3441a63 100644 --- a/panda/src/pgui/pgItem.cxx +++ b/panda/src/pgui/pgItem.cxx @@ -1006,13 +1006,10 @@ get_frame_style(int state) { void PGItem:: set_frame_style(int state, const PGFrameStyle &style) { LightReMutexHolder holder(_lock); - - slot_state_def(state); - - if (_state_defs[state]._root.is_empty()) { - // Create a new node. - _state_defs[state]._root = NodePath("state_" + format_string(state)); - } + // Get the state def node, mainly to ensure that this state is slotted and + // listed as having been defined. + NodePath &root = do_get_state_def(state); + nassertv(!root.is_empty()); _state_defs[state]._frame_style = style; _state_defs[state]._frame_stale = true;