From: Thomas Geymayer Date: Tue, 2 Jun 2015 16:24:31 +0000 (+0200) Subject: canvas::Map: remove rotation matrix on removing HDG node. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9ea772f938a57e8dfee8d6378044d0cad2a393d1;p=simgear.git canvas::Map: remove rotation matrix on removing HDG node. Return to previous rotation if autorotation to HDG is disabled/removed. --- diff --git a/simgear/canvas/elements/CanvasMap.cxx b/simgear/canvas/elements/CanvasMap.cxx index ee60bf24..80710f50 100644 --- a/simgear/canvas/elements/CanvasMap.cxx +++ b/simgear/canvas/elements/CanvasMap.cxx @@ -128,7 +128,13 @@ namespace canvas // TODO remove from other node _geo_nodes.erase(child); else if( parent != _node && child->getName() == HDG ) + { _hdg_nodes.erase(child); + + // Remove rotation matrix (tf[0]) and return to element always being + // oriented upwards (or any orientation inside other matrices). + child->getParent()->removeChild("tf", 0); + } else return Element::childRemoved(parent, child); }