Ignore:
Timestamp:
07/25/12 11:58:00 (12 years ago)
Author:
pharms
Message:

corrected implementation of clone

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/quest-core-tasktrees/src/main/java/de/ugoe/cs/quest/tasktrees/treeimpl/TextInputInteractionTaskImpl.java

    r451 r467  
    1010import de.ugoe.cs.quest.eventcore.guimodel.GUIElement; 
    1111import de.ugoe.cs.quest.eventcore.userinteraction.TextInput; 
    12 import de.ugoe.cs.quest.tasktrees.treeifc.TaskTreeNode; 
    1312import de.ugoe.cs.quest.tasktrees.treeifc.TextInputInteractionTask; 
    1413 
     
    4847  public TextInputInteractionTaskImpl clone() 
    4948  { 
    50     TextInputInteractionTaskImpl clone = new TextInputInteractionTaskImpl(super.getGUIElement()); 
    51     clone.setDescription(super.getDescription()); 
    52     clone.setEnteredText(this.getEnteredText()); 
    53      
    54     for (TaskTreeNode child : getChildren()) 
    55     { 
    56       clone.addChild(child); 
    57     } 
    58      
    59     return clone; 
     49    // entered text is unchangeable and does not need to be cloned 
     50    return (TextInputInteractionTaskImpl) super.clone(); 
    6051  } 
    6152 
Note: See TracChangeset for help on using the changeset viewer.