serge-rgb / milton

An infinite-canvas paint program
GNU General Public License v3.0
1.53k stars 133 forks source link

Problem with future combatibility in serializing bindings #156

Open aameen951 opened 5 years ago

aameen951 commented 5 years ago

I found something that will cause a problem in the future when adding new key bindings:

https://github.com/serge-rgb/milton/blob/c2a9dc3d9e6c045d1d71cbcdb08b0e56cb2b9ee7/src/bindings.h#L50-L57

Adding new bindings must be before Action_COUNT. However, this reordering will cause a compatibility issue when reading the setting from file since it will be loaded into the wrong index.