simgear/scene/model/SGReaderWriterXML.cxx: minor change to addTooltipAnimations().

Improved calculation of num_new_animations.
This commit is contained in:
Julian Smith 2020-06-21 23:26:15 +01:00
parent 510b25f8b8
commit cc699871a3

View File

@ -396,10 +396,10 @@ void addTooltipAnimations(const SGPath& path, SGPropertyNode_ptr props, osg::ref
/* Make a unique tooltip-id. */ /* Make a unique tooltip-id. */
std::string tooltip_id = "auto-tooltip-"; std::string tooltip_id = "auto-tooltip-";
{ {
num_new_animations += 1;
if (autoTooltipsMasterMax > 0 && num_new_animations > autoTooltipsMasterMax) { if (autoTooltipsMasterMax > 0 && num_new_animations > autoTooltipsMasterMax) {
continue; continue;
} }
num_new_animations += 1;
std::ostringstream s; std::ostringstream s;
s << num_new_animations; s << num_new_animations;
tooltip_id += s.str(); tooltip_id += s.str();