Mercurial > louis > kiibohd-kll
changeset 16:e3051d204f87
Fixing layered assignment bug.
- Layered assignments were lost due to how the cached assignments were replayed
- Replaying each assignment cache after each file is done processing
author | Jacob Alexander <haata@kiibohd.com> |
---|---|
date | Tue, 16 Sep 2014 18:14:06 -0700 |
parents | 02cbd90e8919 |
children | 6cde2b556707 |
files | kll.py kll_lib/containers.py |
diffstat | 2 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/kll.py Tue Sep 16 17:01:40 2014 -0700 +++ b/kll.py Tue Sep 16 18:14:06 2014 -0700 @@ -558,8 +558,8 @@ # Default combined layer for filename in defaultFiles: processKLLFile( filename ) - # Apply assignment cache, see 5.1.2 USB Codes for why this is necessary - macros_map.replayCachedAssignments() + # Apply assignment cache, see 5.1.2 USB Codes for why this is necessary + macros_map.replayCachedAssignments() # Iterate through additional layers for partial in partialFileSets:
--- a/kll_lib/containers.py Tue Sep 16 17:01:40 2014 -0700 +++ b/kll_lib/containers.py Tue Sep 16 18:14:06 2014 -0700 @@ -146,7 +146,8 @@ self.macros[ self.layer ][ trigger ] = [ result ] # Mark layer scan code, so it won't be removed later - if not self.baseLayout is None: + # Also check to see if it hasn't already been removed before + if not self.baseLayout is None and trigger in self.layerLayoutMarkers[ self.layer ]: del self.layerLayoutMarkers[ self.layer ][ trigger ] # Return a list of ScanCode triggers with the given USB Code trigger