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

Moved QuickMenu from 'canvas' to 'document' package.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/document/schemeedit.py

    r11162 r11163  
    2020from . import interactions 
    2121from . import commands 
     22from . import quickmenu 
    2223 
    2324 
     
    7475        self.__itemsMoving = {} 
    7576        self.__contextMenuTarget = None 
     77        self.__quickMenu = None 
    7678 
    7779        self.__editFinishedMapper = QSignalMapper(self) 
     
    232234        if self.__scene: 
    233235            self.__scene.set_registry(registry) 
     236            self.__quickMenu = None 
     237 
     238    def quickMenu(self): 
     239        """Return a quick menu instance for quick new node creation. 
     240        """ 
     241        if self.__quickMenu is None: 
     242            menu = quickmenu.QuickMenu(self) 
     243            if self.__registry is not None: 
     244                menu.setModel(self.__registry.model()) 
     245            self.__quickMenu = menu 
     246        return self.__quickMenu 
    234247 
    235248    def addNode(self, node): 
Note: See TracChangeset for help on using the changeset viewer.