Ignore:
Timestamp:
11/20/12 16:13:39 (17 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Simplify the link text if the two channel names are the same, use unicode arrow character.

File:
1 edited

Legend:

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

    r11184 r11191  
    294294 
    295295        if self.__sourceName or self.__sinkName: 
    296             text = "{0} --> {1}".format(self.__sourceName, self.__sinkName) 
     296            if self.__sourceName != self.__sinkName: 
     297                text = u"{0} \u2192 {1}".format(self.__sourceName, 
     298                                                self.__sinkName) 
     299            else: 
     300                # If the names are the same show only one. 
     301                # Is this right? If the sink has two input channels of the 
     302                # same type having the name on the link help elucidate 
     303                # the scheme. 
     304                text = self.__sourceName 
    297305        else: 
    298306            text = "" 
     307 
    299308        self.linkTextItem.setPlainText(text) 
    300309 
Note: See TracChangeset for help on using the changeset viewer.