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

Clear current/selected items before showing the menu.

File:
1 edited

Legend:

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

    r11504 r11507  
    996996        Popup the menu at `pos` (in screen coordinates). 'Search' text field 
    997997        is initialized with `searchText` if provided. 
     998 
    998999        """ 
    9991000        if pos is None: 
    10001001            pos = QPoint() 
     1002 
     1003        self.__clearCurrentItems() 
    10011004 
    10021005        self.__search.setText(searchText) 
     
    10881091        """ 
    10891092        self.__pages.setCurrentIndex(index) 
     1093 
     1094    def __clearCurrentItems(self): 
     1095        """ 
     1096        Clear any selected (or current) items in all the menus. 
     1097        """ 
     1098        for i in range(self.__pages.count()): 
     1099            self.__pages.page(i).view().selectionModel().clear() 
    10901100 
    10911101    def __onTriggered(self, action): 
Note: See TracChangeset for help on using the changeset viewer.