]> git.mxchange.org Git - flightgear.git/blobdiff - src/Input/FGDeviceConfigurationMap.cxx
Minor renaming issue.
[flightgear.git] / src / Input / FGDeviceConfigurationMap.cxx
index 1991daaef741b3fc8a9437c94ca7e6fb1a7cf6c0..b4b6b1baf24d278812efb5990cc3df4e7f0f8bce 100644 (file)
@@ -39,6 +39,7 @@ FGDeviceConfigurationMap::FGDeviceConfigurationMap( const char * relative_path,
   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);
@@ -53,7 +54,10 @@ FGDeviceConfigurationMap::FGDeviceConfigurationMap( const char * relative_path,
 
 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)