Changeset 25c1576 in sasview for guiframe/local_perspectives


Ignore:
Timestamp:
May 10, 2011 4:29:26 PM (14 years ago)
Author:
Jae Cho <jhjcho@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
c91ef7e
Parents:
49a2aa71
Message:

try to fix mac close event

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guiframe/local_perspectives/plotting/plotting.py

    r56d5562 r25c1576  
    2222DEFAULT_MENU_ITEM_LABEL = "No graph available" 
    2323DEFAULT_MENU_ITEM_ID = wx.NewId() 
     24 
     25if sys.platform.count("darwin")==0: 
     26    IS_MAC = False 
     27else: 
     28    IS_MAC = True 
    2429 
    2530class Plugin(PluginBase): 
     
    155160        self.menu.Check(event_id, True) 
    156161        wx.EVT_MENU(self.parent, event_id, self._on_check_menu) 
    157         wx.EVT_SHOW(new_panel, self._on_close_panel) 
     162         
     163        if IS_MAC: 
     164            wx.EVT_CLOSE(new_panel, self._on_close_panel) 
     165        else: 
     166            wx.EVT_SHOW(new_panel, self._on_close_panel) 
     167         
    158168        # Set UID to allow us to reference the panel later 
    159169        new_panel.uid = event_id 
Note: See TracChangeset for help on using the changeset viewer.