# include <config.h>
#endif
-#include <simgear/math/SGMath.hxx>
-
#include "FGDeviceConfigurationMap.hxx"
#include <simgear/misc/sg_dir.hxx>
childname(aChildname)
{
int index = 1000;
+ scan_dir( SGPath(globals->get_fg_home(), relative_path), &index);
scan_dir( SGPath(globals->get_fg_root(), relative_path), &index);
PropertyList childNodes = base->getChildren(childname);
FGDeviceConfigurationMap::~FGDeviceConfigurationMap()
{
- base->removeChildren( childname );
+ // Ensure that the children don't hang around when deleted, as if
+ // re-created, we need to ensure that the set of names doesn't contain
+ // any unexpected history.
+ base->removeChildren( childname, false );
}
void FGDeviceConfigurationMap::scan_dir(const SGPath & path, int *index)