Changeset 4470b10 in sasview for sansview/perspectives/fitting
- Timestamp:
- May 14, 2010 11:46:29 AM (15 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
- Location:
- sansview/perspectives/fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/basepage.py
r4fbc93e r4470b10 554 554 """ 555 555 if self.model==None: 556 msg="Can not bookmark; Please select Data and Model first..." 557 wx.MessageBox(msg, 'Info') 556 558 return 557 559 if hasattr(self,"enable_disp"): … … 802 804 """ 803 805 flag = False 804 if self.data is None and self.model is None: 805 msg = "Please load a Data to start" 806 if self.data is None: 807 self.disable_smearer.SetValue(True) 808 self.disable_disp.SetValue(True) 809 msg = "Please load Data and select Model to start..." 806 810 wx.MessageBox(msg, 'Info') 807 811 return True … … 1128 1132 1129 1133 self.save_current_state() 1130 1134 1131 1135 return flag 1132 1136 … … 1455 1459 """ 1456 1460 if self.check_invalid_panel(): 1461 self.shape_rbutton.SetValue(True) 1457 1462 return 1458 1463 … … 1813 1818 if self.check_invalid_panel(): 1814 1819 return 1820 ## On selction if no model exists. 1821 if self.model ==None: 1822 self.disable_disp.SetValue(True) 1823 msg="Please select a Model first..." 1824 wx.MessageBox(msg, 'Info') 1825 wx.PostEvent(self.manager.parent, StatusEvent(status=\ 1826 "Polydispersion: %s"%msg)) 1827 return 1828 1815 1829 self._reset_dispersity() 1816 1830 -
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.