Changeset bcd3f73 in sasview for sansguiframe/src
- Timestamp:
- Sep 14, 2011 4:15:14 PM (13 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:
- 33fdb34
- Parents:
- 8e671c39
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/gui_manager.py
r8e671c39 rbcd3f73 1240 1240 style = self.__gui_style & GUIFRAME.PLOTTING_ON 1241 1241 if style == GUIFRAME.PLOTTING_ON: 1242 1243 self._window_menu.AppendSeparator() 1244 id = wx.NewId() 1245 hint = "Hide all the graph panels" 1246 self._window_menu.Append(id, '&Hide All', hint) 1247 wx.EVT_MENU(self, id, self.hide_all_plotpanels) 1248 id = wx.NewId() 1249 hint = "Show all the graph panels" 1250 self._window_menu.Append(id, '&Show All', hint) 1251 wx.EVT_MENU(self, id, self.show_all_plotpanels) 1252 1242 1253 self._window_menu.AppendSeparator() 1243 1254 id = wx.NewId() … … 1548 1559 self._mgr.Update() 1549 1560 self._redraw_idle() 1561 1562 def show_all_plotpanels(self, event): 1563 """ 1564 Show all plotpanels shown 1565 1566 :param event: menu event 1567 """ 1568 #event.Skip() 1569 any_hidden = False 1570 for id in self.plot_panels.keys(): 1571 if self._mgr.GetPane(self.plot_panels[id].window_name).IsShown(): 1572 continue 1573 else: 1574 any_hidden = True 1575 self.show_panel(id) 1576 if not any_hidden: 1577 msg = "No graph panels to show." 1578 else: 1579 # Make sure the Checkmenuitem checked: Need this for-loop \ 1580 # because the check menu is not responding on floating panel 1581 for item in self._plotting_plugin.menu.GetMenuItems(): 1582 item.Check(True) 1583 msg = "All graph panels are shown." 1584 wx.PostEvent(self, StatusEvent(status=msg)) 1585 1586 def hide_all_plotpanels(self, event): 1587 """ 1588 Hide all plotpanels shown 1589 1590 :param event: menu event 1591 """ 1592 #event.Skip() 1593 any_shown = False 1594 for ID in self.plot_panels.keys(): 1595 if self._mgr.GetPane(self.plot_panels[ID].window_name).IsShown(): 1596 any_shown = True 1597 self.hide_panel(ID) 1598 else: 1599 continue 1600 if not any_shown: 1601 msg = "No graph panels to hide." 1602 else: 1603 # Make sure the Checkmenuitem unchecked: Need this for-loop 1604 # because the check menu is not responding on floating panel 1605 for item in self._plotting_plugin.menu.GetMenuItems(): 1606 item.Check(False) 1607 msg = "All graph panels are hidden." 1608 wx.PostEvent(self, StatusEvent(status=msg)) 1550 1609 1551 1610 def hide_panel(self, uid):
Note: See TracChangeset
for help on using the changeset viewer.