From 2e3cace7f96315377af6145cd823aba3aee3358f Mon Sep 17 00:00:00 2001 From: James Turner Date: Tue, 26 Jun 2018 08:26:57 +0100 Subject: [PATCH] Canvas::path: early return for descendant changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ‘rect’ attributes of Path were before the early-return when the change is for a descendant node. --- simgear/canvas/elements/CanvasPath.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/simgear/canvas/elements/CanvasPath.cxx b/simgear/canvas/elements/CanvasPath.cxx index 5fd8b775..ae083e84 100644 --- a/simgear/canvas/elements/CanvasPath.cxx +++ b/simgear/canvas/elements/CanvasPath.cxx @@ -863,6 +863,9 @@ namespace canvas //---------------------------------------------------------------------------- void Path::childChanged(SGPropertyNode* child) { + if( child->getParent() != _node ) + return; + const std::string& name = child->getNameString(); const std::string &prName = child->getParent()->getNameString(); @@ -892,9 +895,6 @@ namespace canvas return; } - if( child->getParent() != _node ) - return; - if( name == "cmd" ) _attributes_dirty |= CMDS; else if( name == "coord" )