std::shared_ptr<Tool> Item::getTool( TransformSet &xform, const std::string &ext ) const { if ( ! myForceToolAll.empty() ) return xform.findToolByTag( myForceToolAll, ext ); auto x = myForceToolExt.find( ext ); if ( x != myForceToolExt.end() ) { DEBUG( "Overriding tool for extension '" << ext << "' to '" << x->second << "'" ); return xform.findToolByTag( x->second, ext ); } ItemPtr i = getParent(); if ( i ) return i->getTool( xform, ext ); return xform.findTool( ext ); }