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:
parent
6ce3f4cb25
commit
5c78970663
1 changed files with 4 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue