Ignore:
Timestamp:
03/09/15 15:27:58 (10 years ago)
Author:
dmay
Message:

always finish mouse clicks correctly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc/commands/CMDgenerateJacaretoReplay.java

    r1883 r1901  
    343343        menuElements = new HashMap<>(); 
    344344        modifiers = createModifierMap(); 
     345 
     346        int index = 1; 
     347        for (List<Event> sequence : sequences) { 
     348            reinit(); 
     349            writeJacaretoXML(sequence, filename + "_" + index, classpath, basepath, classpathext); 
     350            index++; 
     351        } 
     352    } 
     353 
     354    private void reinit() { 
     355        currentFocus = null; 
    345356        currentKeyModifiers = 0; 
    346357        StructureNode.nextRef = 0; 
    347  
    348         int index = 1; 
    349         for (List<Event> sequence : sequences) { 
    350             writeJacaretoXML(sequence, filename + "_" + index, classpath, basepath, classpathext); 
    351             index++; 
    352         } 
     358        lastFocusChangeEvent = null; 
     359        lastItemActionEvent = null; 
     360        lastKeySequenceEvent = null; 
     361        lastKeyTypedEvent = null; 
     362        lastMouseClickEvent = null; 
     363        lastMouseDownTarget = null; 
    353364    } 
    354365 
     
    550561                    structure.children.add(lastMouseClickEvent); 
    551562                    structure.children.add(lastItemActionEvent); 
     563 
     564                    lastMouseClickEvent = null; 
    552565                } 
    553566                else { 
     
    736749 
    737750        lastMouseDownTarget = null; 
     751        lastMouseClickEvent = null; 
    738752    } 
    739753 
     
    813827        // get rid of the quote symbols in the command because we want to 
    814828        // escape the middle part for XML 
    815         String cmd = target.getName().substring(1, target.getName().length()-1); 
    816          
     829        String cmd = target.getName().substring(1, target.getName().length() - 1); 
     830 
    817831        //@formatter:off 
    818832        writeLine(writer, 
Note: See TracChangeset for help on using the changeset viewer.