Changeset 4470b10 in sasview for sansview/perspectives/fitting/fitpage.py
- Timestamp:
- May 14, 2010 11:46:29 AM (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:
- f151ddf
- Parents:
- 9266c66
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitpage.py
rfd50e2f r4470b10 777 777 if self.check_invalid_panel(): 778 778 return 779 if self.model ==None: 780 msg="Please select a Model first..." 781 wx.MessageBox(msg, 'Info') 782 wx.PostEvent(self.manager.parent, StatusEvent(status=\ 783 "Fit: %s"%msg)) 784 return 785 779 786 flag = self._update_paramv_on_fit() 780 787 … … 851 858 try: 852 859 temp_smear= None 860 self.disable_smearer.SetValue(True) 853 861 if self.enable_smearer.GetValue(): 854 862 temp_smear= self.smearer … … 878 886 when enter value on panel redraw model according to changed 879 887 """ 888 if self.model ==None: 889 msg="Please select a Model first..." 890 wx.MessageBox(msg, 'Info') 891 #wx.PostEvent(self.manager.parent, StatusEvent(status=\ 892 # "Parameters: %s"%msg)) 893 return 894 880 895 #default flag 881 896 flag = False … … 1217 1232 1218 1233 # Check if the accuracy is same as before 1219 # Mac does not get the GetEventObject; use the line below1234 1220 1235 #self.smear2d_accuracy = event.GetEventObject().GetValue() 1221 1236 self.smear2d_accuracy = self.smear_accuracy.GetValue() … … 1539 1554 return 1540 1555 if self.model ==None: 1541 msg="Need model and data to smear plot" 1556 self.disable_smearer.SetValue(True) 1557 msg="Please select a Model first..." 1558 wx.MessageBox(msg, 'Info') 1542 1559 wx.PostEvent(self.manager.parent, StatusEvent(status=\ 1543 1560 "Smear: %s"%msg)) 1544 1561 return 1545 1562 1546 1563 # Need update param values 1547 1564 self._update_paramv_on_fit() … … 1701 1718 are compute when fitting 1702 1719 """ 1703 1704 1720 1705 1721 if self.check_invalid_panel(): 1706 1722 return 1723 1707 1724 if self.model ==None: 1708 msg="Need model and data to smear plot" 1725 self.disable_smearer.SetValue(True) 1726 1727 msg="Please select a Model first..." 1728 wx.MessageBox(msg, 'Info') 1709 1729 wx.PostEvent(self.manager.parent, StatusEvent(status=\ 1710 1730 "Smear: %s"%msg)) 1711 1731 return 1732 1712 1733 # Need update param values 1713 1734 self._update_paramv_on_fit() … … 1727 1748 else: 1728 1749 is_new_slit = True 1729 1750 1730 1751 # if any value is changed 1731 1752 if is_new_slit: 1732 1753 msg = self._set_slit_smear() 1754 1733 1755 # hide all silt sizer 1734 1756 self._hide_all_smear_info() … … 1739 1761 self.sizer_set_smearer.Layout() 1740 1762 self.Layout() 1741 1763 1742 1764 if event != None: 1743 1765 event.Skip() … … 1749 1771 wx.PostEvent(self.manager.parent, StatusEvent(status = msg)) 1750 1772 1751 1773 1752 1774 def _is_changed_slit(self): 1753 1775 """ … … 1755 1777 return: True or False 1756 1778 """ 1779 1757 1780 # get the values 1758 1781 width = self.smear_slit_width.GetValue() … … 1787 1810 if self.dxl != dxl: 1788 1811 return True 1812 1789 1813 return False 1790 1814 … … 1825 1849 else: 1826 1850 self.smear_slit_width.SetBackgroundColour(wx.WHITE) 1827 1851 1828 1852 self.current_smearer = smear_selection(data) 1829 1853 #temp_smearer = self.current_smearer … … 1864 1888 return 1865 1889 if self.model ==None: 1866 msg="Need model and data to smear plot" 1890 self.disable_smearer.SetValue(True) 1891 msg="Please select a Model first..." 1892 wx.MessageBox(msg, 'Info') 1867 1893 wx.PostEvent(self.manager.parent, StatusEvent(status=\ 1868 1894 "Smear: %s"%msg))
Note: See TracChangeset
for help on using the changeset viewer.