This fixes issue #58 by making sure a lock is used before enumerating over or modifying each of the three All* list types in Program.
For locking while enumerating in refreshAction, a lock is simply used in the lambda function. For locking while adding to a list, a separate function has been added to reduce code duplication.
AddEntity, AddTexture, and AddAnimation are now used as the addedAction's for all parsers. These functions handle locking the list before adding to it, and also perform the standard UpdateProgress and ReloadItems calls. The only thing this refactor changes, is that VDF and AN formats now also print the animation frame count when found (like all other parsers that support animation).
This fixes issue #58 by making sure a lock is used before enumerating over or modifying each of the three
All*
list types inProgram
.For locking while enumerating in
refreshAction
, a lock is simply used in the lambda function. For locking while adding to a list, a separate function has been added to reduce code duplication.AddEntity
,AddTexture
, andAddAnimation
are now used as theaddedAction
's for all parsers. These functions handle locking the list before adding to it, and also perform the standardUpdateProgress
andReloadItems
calls. The only thing this refactor changes, is that VDF and AN formats now also print the animation frame count when found (like all other parsers that support animation).