From be67f3475e8c11867df653ae987c2ece475b1b9c Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 21 Mar 2002 02:01:40 +0000 Subject: [PATCH] fix adjust_all_priorities --- panda/src/pgraph/qpnodePath.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/panda/src/pgraph/qpnodePath.cxx b/panda/src/pgraph/qpnodePath.cxx index b2ca33976d..0b5bff0ccf 100644 --- a/panda/src/pgraph/qpnodePath.cxx +++ b/panda/src/pgraph/qpnodePath.cxx @@ -2856,6 +2856,15 @@ r_find_matches(qpNodePathCollection &result, void qpNodePath:: r_adjust_all_priorities(PandaNode *node, int adjustment) { node->set_state(node->get_state()->adjust_all_priorities(adjustment)); + if (node->is_geom_node()) { + qpGeomNode *gnode; + DCAST_INTO_V(gnode, node); + + int num_geoms = gnode->get_num_geoms(); + for (int i = 0; i < num_geoms; i++) { + gnode->set_geom_state(i, gnode->get_geom_state(i)->adjust_all_priorities(adjustment)); + } + } PandaNode::Children cr = node->get_children(); int num_children = cr.get_num_children();