From edae7a2b75a5459d0482d48af65463b6bb08fc25 Mon Sep 17 00:00:00 2001 From: Erik Hofman Date: Sun, 15 Mar 2020 14:33:05 +0100 Subject: [PATCH] Make warnings and alerts a single message for DEV_WARN and DEV_ALERT since they will result in a popu-dialog message --- simgear/scene/model/animation.cxx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/simgear/scene/model/animation.cxx b/simgear/scene/model/animation.cxx index f095123a..e1d8ba70 100644 --- a/simgear/scene/model/animation.cxx +++ b/simgear/scene/model/animation.cxx @@ -456,8 +456,7 @@ SGAnimation::~SGAnimation() if (!info.empty()) { SG_LOG(SG_IO, SG_DEV_ALERT, "Could not find at least one of the following" - " objects for animation: " << info); - SG_LOG(SG_IO, SG_DEV_ALERT, " in file: " << _modelData.getPath()); + " objects for animation: " << info << " in file: " << _modelData.getPath()); } } } @@ -774,13 +773,11 @@ bool SGAnimation::setCenterAndAxisFromObject(osg::Node *rootNode, SGVec3d& cente object_group->setNodeMask(0); } else { - SG_LOG(SG_IO, SG_DEV_ALERT, "Could not find a valid line segment for animation: " << axis_object_name); - SG_LOG(SG_IO, SG_DEV_ALERT, " in file: " << _modelData.getPath()); + SG_LOG(SG_IO, SG_DEV_ALERT, "Could not find a valid line segment for animation: " << axis_object_name << " in file: " << _modelData.getPath()); } } else if (can_warn) { - SG_LOG(SG_IO, SG_DEV_ALERT, "Could not find at least one of the following objects for axis animation: " << axis_object_name); - SG_LOG(SG_IO, SG_DEV_ALERT, " in file: " << _modelData.getPath()); + SG_LOG(SG_IO, SG_DEV_ALERT, "Could not find at least one of the following objects for axis animation: " << axis_object_name << " in file: " << _modelData.getPath()); } } if (axisSegment) @@ -2399,13 +2396,11 @@ SGTexTransformAnimation::createAnimationGroup(osg::Group& parent) appendTexTrapezoid(*transformConfigs[i], updateCallback); else { SG_LOG(SG_IO, SG_DEV_ALERT, - "Ignoring unknown texture transform subtype"); - SG_LOG(SG_IO, SG_DEV_ALERT, " in file: " << _modelData.getPath()); + "Ignoring unknown texture transform subtype in file: " << _modelData.getPath()); } } } else { - SG_LOG(SG_IO, SG_DEV_ALERT, "Ignoring unknown texture transform type"); - SG_LOG(SG_IO, SG_DEV_ALERT, " in file: " << _modelData.getPath()); + SG_LOG(SG_IO, SG_DEV_ALERT, "Ignoring unknown texture transform type in file: " << _modelData.getPath()); } texMat->setUpdateCallback(updateCallback);