Changeset cb274d9e in sasview for invariantview/perspectives/invariant
- Timestamp:
- Jul 26, 2010 7:39:20 PM (14 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:
- 9c1f463
- Parents:
- b281210
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
invariantview/perspectives/invariant/invariant_panel.py
rcef847c rcb274d9e 195 195 wx.PostEvent(self.parent,StatusEvent(status=msg,info="info")) 196 196 self.hint_msg_txt.SetLabel(msg) 197 self.data_name_boxsizer.Layout()197 198 198 199 199 def set_manager(self, manager): … … 238 238 239 239 self._get_input_list() 240 240 #make sure that the data is reset (especially when loaded from a inv file) 241 self.state.data = self._data 241 242 self.new_state = False 242 243 … … 595 596 #enable the button_ok for more details 596 597 self.button_details.Enable() 597 self.button_details.SetFocus() 598 598 599 if event != None: 599 600 self.button_report.Enable(True) … … 614 615 615 616 if float(pre_state_num) <=0: 616 self. button_undo.Disable()617 el if not self.button_undo.Enabled:618 self. button_undo.Enable(True)617 self._undo_disable() 618 else: 619 self._undo_enable() 619 620 620 621 self._redo_enable() … … 631 632 if event != None: event.Skip() 632 633 self.is_power_out = True 634 # get the next state_num 633 635 next_state_num = int(self.state.saved_state['state_num']) + 1 634 636 … … 636 638 637 639 if float(next_state_num)+2 > len(self.state.state_list): 638 self. button_redo.Disable()640 self._redo_disable() 639 641 elif not self.button_redo.Enabled: 640 self. button_redo.Enable(True)642 self._redo_enable() 641 643 642 644 self._undo_enable() … … 653 655 654 656 self.state.set_report_string() 655 report_string = self.state.report_str 656 dialog = ReportDialog(report_string, None, -1, "") 657 report_html_str = self.state.report_str 658 report_text_str = self.state.__str__() 659 report_img = self.state.image 660 report_list = [report_html_str,report_text_str,report_img] 661 dialog = ReportDialog(report_list, None, -1, "") 657 662 dialog.ShowModal() 658 663 … … 662 667 663 668 : param state_num: the given state number 664 665 """ 666 669 """ 667 670 if state_num == None: 668 671 return … … 694 697 # set the input params at the state at pre_state_num 695 698 for key in current_state: 696 # Do not reset set some outputs697 #key_split = key.split('_')698 #if key_split[0] == 'surface' or key_split[0] == 'volume':699 # continue700 699 # set the inputs and boxes 701 700 value = current_state[key] 702 703 701 try: 704 702 exec 'self.%s.SetValue(str(%s))' % (key, value) … … 708 706 pass 709 707 710 711 708 self._enable_high_q_section(event=None) 712 709 self._enable_low_q_section(event=None) … … 714 711 self.state.saved_state = current_state 715 712 self.state.state_num = state_num 716 717 713 718 714 719 715 def get_bookmark_by_num(self, num=None): … … 798 794 799 795 :param event: rb/cb event 800 801 796 """ 802 797 if event == None: … … 1016 1011 msg= "State saved at %s on %s"%(my_time, date) 1017 1012 ## post help message for the selected model 1018 msg +=" Saved! right click on this page to retrieve this model"1013 msg +=" Right click on the panel to retrieve this state" 1019 1014 #wx.PostEvent(self.parent.parent, StatusEvent(status = msg )) 1020 1015 name = "%d] bookmarked at %s on %s"%(self.bookmark_num,my_time, date) … … 1028 1023 self.state.bookmark_list[self.bookmark_num] = [my_time,date,state,comp_state] 1029 1024 self.state.toXML(self, doc=None, entry_node=None) 1025 1026 wx.PostEvent(self.parent,StatusEvent(status=msg,info="info")) 1030 1027 1031 1028 def _back_to_bookmark(self,event): … … 1719 1716 Do the layout for the save button widgets 1720 1717 """ 1721 import sans.perspectives.invariant as invariant 1722 #from wx.lib.buttons import GenBitmapTextButton 1723 1724 path = invariant.get_data_path(media='media') 1718 import sans.perspectives.invariant as inv 1719 1720 path = inv.get_data_path(media='media') 1725 1721 self.undo_png = os.path.join(path,"undo.png") 1726 1722 self.redo_png = os.path.join(path,"redo.png") … … 1733 1729 self.button_undo.SetToolTipString("Undo") 1734 1730 #self.button_undo.SetBackgroundColour('#c2e6f8') 1735 1736 1731 self.Bind(wx.EVT_BUTTON, self.undo, id=id) 1737 self. button_undo.Disable()1732 self._undo_disable() 1738 1733 #redo button 1739 1734 id = wx.NewId() … … 1741 1736 self.button_redo.SetToolTipString("Redo") 1742 1737 self.Bind(wx.EVT_BUTTON, self.redo, id=id) 1743 self. button_redo.Disable()1738 self._redo_disable() 1744 1739 #bookmark button 1745 1740 id = wx.NewId() 1746 1741 self.button_bookmark = wx.BitmapButton(self, id,wx.Bitmap(self.bookmark_png))#wx.Button(self, id, "Undo",size=(50,20)) 1747 self.button_bookmark.SetToolTipString("Bookmark: right-click on the panel to retrieve ")1742 self.button_bookmark.SetToolTipString("Bookmark: right-click on the panel to retrieve it") 1748 1743 self.Bind(wx.EVT_BUTTON, self._on_bookmark, id=id) 1749 1744 #report button
Note: See TracChangeset
for help on using the changeset viewer.