Ignore:
Timestamp:
10/11/12 20:12:58 (18 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Fixed scheme annotation serialization, added tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/scheme/readwrite.py

    r11101 r11112  
    115115            rect = annot_el.attrib.get("rect", "(0, 0, 20, 20)") 
    116116            rect = literal_eval(rect) 
    117             annot = SchemeTextAnnotation(rect, annot_el.text) 
     117            annot = SchemeTextAnnotation(rect, annot_el.text or "") 
    118118        elif annot_el.tag == "arrow": 
    119119            start = annot_el.attrib.get("start", "(0, 0)") 
     
    261261    for annotation in scheme.annotations: 
    262262        annot_id = annotation_ids[annotation] 
    263         attrs = {"id": annot_id} 
     263        attrs = {"id": str(annot_id)} 
    264264        data = None 
    265265        if isinstance(annotation, SchemeTextAnnotation): 
Note: See TracChangeset for help on using the changeset viewer.