Ignore:
Timestamp:
09/03/12 09:05:26 (12 years ago)
Author:
pharms
Message:
  • handle invalid log in which there is a key down missing for a matched key up
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/gui/SortedInteractionEventList.java

    r683 r738  
    4646            } 
    4747 
    48             eventPairs.add(new KeyEventPair(event)); 
    49             return true; 
     48            // in the case the log has an error because it has a key up for which there is no 
     49            // key down, log a warning and add the key up event without sorting it 
     50            if (event.getType() instanceof KeyPressed) { 
     51                eventPairs.add(new KeyEventPair(event)); 
     52                return true; 
     53            } 
     54            else { 
     55                return super.add(event); 
     56            } 
    5057        } 
    5158        else { 
Note: See TracChangeset for help on using the changeset viewer.