Changeset 6e75ed0 in sasview for sansguiframe/src/sans/guiframe/gui_manager.py
- Timestamp:
- Apr 23, 2012 10:00:49 AM (12 years ago)
- 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:
- 2ee5c61
- Parents:
- 3553ad2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/gui_manager.py
r5cc6d20 r6e75ed0 427 427 if count >= 2: 428 428 column_names_line = line 429 first_data_index = index430 429 break 431 430 … … 460 459 fd.write(str(details)) 461 460 for col_name in data.keys(): 462 463 461 fd.write(str(col_name)) 462 fd.write(separator) 464 463 fd.write('\n') 465 464 max_list = [len(value) for value in data.values()] … … 904 903 # Show a default panel with some help information 905 904 # It also sets the size of the application windows 906 #TODO: Use this for s lpash screen905 #TODO: Use this for splash screen 907 906 if self.defaultPanel is None: 908 907 self.defaultPanel = DefaultPanel(self, -1, style=wx.RAISED_BORDER) … … 1028 1027 return menu_list 1029 1028 1029 1030 def on_panel_close(self, event): 1031 """ 1032 Gets called when the close event for a panel runs. 1033 This will check which panel has been closed and 1034 delete it. 1035 """ 1036 panel = event.GetPane() 1037 for ID in self.plot_panels.keys(): 1038 if self.plot_panels[ID].window_name == panel.name: 1039 self.delete_panel(ID) 1040 break 1041 1042 1030 1043 def popup_panel(self, p): 1031 1044 """ … … 1045 1058 windowcaption = 'Graph'#p.window_caption 1046 1059 windowname = p.window_name 1047 """ 1048 count = 0 1049 for item in self.panels: 1050 if self.panels[item].window_name.startswith(p.window_name)\ 1051 or self._mgr.GetPane(p.window_name).IsOk(): 1052 count += 1 1053 1054 if count > 0: 1055 windowname += str(count+1) 1056 """ 1060 1057 1061 # Append nummber 1058 1062 captions = self._get_plotpanel_captions() … … 1067 1071 if p.window_caption.split()[0] not in NOT_SO_GRAPH_LIST: 1068 1072 p.window_caption = caption 1069 #p.window_caption = windowcaption+ str(self.graph_num)1070 1073 p.window_name = windowname + str(self.graph_num) 1071 1074 … … 1100 1103 1101 1104 self._popup_floating_panel(p) 1102 1105 1106 # Register for closing of panels 1107 self.Bind(wx.aui.EVT_AUI_PANE_CLOSE, self.on_panel_close) 1103 1108 # Register for showing/hiding the panel 1104 1109 wx.EVT_MENU(self, ID, self.on_view) … … 1475 1480 """ 1476 1481 1477 1482 # File menu 1478 1483 self._file_menu = wx.Menu() 1479 1484 #append item from plugin under menu file if necessary … … 1742 1747 if self._mgr.GetPane(self.panels[ID].window_name).IsShown(): 1743 1748 self._mgr.GetPane(self.panels[ID].window_name).Hide() 1749 item = self._plotting_plugin.menu.FindItemById(uid) 1750 item.Check(False) 1744 1751 if self._data_panel is not None and \ 1745 1752 ID in self.plot_panels.keys(): … … 1769 1776 panel.Close() 1770 1777 if panel in self.schedule_full_draw_list: 1771 self.schedule_full_draw_list.remove(panel)1778 self.schedule_full_draw_list.remove(panel) 1772 1779 1773 1780 #delete uid number not str(uid) … … 1839 1846 path = os.path.abspath(path) 1840 1847 if not os.path.isfile(path) and not os.path.isdir(path): 1841 return1848 return 1842 1849 1843 1850 if os.path.isdir(path): … … 2054 2061 logging.error(msg) 2055 2062 except: 2056 msg = "Error occurred while saving: "2057 msg += "To save, at leat one application panel "2058 msg += "should have a data set.."2059 wx.PostEvent(self, StatusEvent(status=msg))2063 msg = "Error occurred while saving: " 2064 msg += "To save, at leat one application panel " 2065 msg += "should have a data set.." 2066 wx.PostEvent(self, StatusEvent(status=msg)) 2060 2067 2061 2068 def on_save_helper(self, doc, reader, panel, path): … … 3497 3504 app = ViewApp(0) 3498 3505 app.MainLoop() 3499 3500
Note: See TracChangeset
for help on using the changeset viewer.