Ignore:
Timestamp:
11/22/12 18:00:59 (17 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Add a 'Text Annotation' to the scheme with a single click.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/canvas/items/annotationitem.py

    r11192 r11193  
    6161        self.__textItem.setTabChangesFocus(True) 
    6262        self.__textItem.setTextInteractionFlags(Qt.NoTextInteraction) 
     63        self.__textItem.setFont(self.font()) 
    6364        self.__textInteractionFlags = Qt.NoTextInteraction 
    6465 
     
    232233 
    233234        return Annotation.itemChange(self, change, value) 
     235 
     236    def changeEvent(self, event): 
     237        if event.type() == QEvent.FontChange: 
     238            self.__textItem.setFont(self.font()) 
     239 
     240        Annotation.changeEvent(self, event) 
    234241 
    235242 
Note: See TracChangeset for help on using the changeset viewer.