Ignore:
Timestamp:
04/11/13 18:14:46 (12 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Override the 'Quit' keyboard shortcut when a popup window is shown.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/application/canvasmain.py

    r11446 r11462  
    13341334        """Quit the application. 
    13351335        """ 
    1336         self.close() 
     1336        if QApplication.activePopupWidget(): 
     1337            # On OSX the actions in the global menu bar are triggered 
     1338            # even if an popup widget is running it's own event loop 
     1339            # (in exec_) 
     1340            log.debug("Ignoring a quit shortcut during an active " 
     1341                      "popup dialog.") 
     1342        else: 
     1343            self.close() 
    13371344 
    13381345    def select_all(self): 
Note: See TracChangeset for help on using the changeset viewer.