1
0
Fork 0

Stop the property tree from keeping a shadow of the deleted input properties, as it can mean that the array of bindings ends up with some incorrect name tags if the set of joystick config files changes and a given js-named entry shifts in the array. This can then result in incorrect bindings being selected.

This commit is contained in:
Stuart Buchanan 2012-08-25 22:23:55 +01:00
parent 6ce3f4cb25
commit 5c78970663

View file

@ -54,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)