Changeset 0d9401e in sasview


Ignore:
Timestamp:
Feb 18, 2015 4:32:15 AM (9 years ago)
Author:
butler
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:
4547688
Parents:
74f6c7e
Message:

Removed a chunck of obsolete code starting at line 1863

The code had been commeted out in April of 2014 as no longer being
called. Since no problems have been noted to this point have cleaned it
up by deleting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/perspectives/fitting/basepage.py

    r74f6c7e r0d9401e  
    18611861                              [max_state, max_value], unit]) 
    18621862            
    1863 #    The following funcion seems to be superseded with fillsizer and  
    1864 #    init combo box.  certainly it seems not to know about categories and uses  
    1865 #    only shapes and shape independent -- tested after commenting out and does 
    1866 #    not seem to cause problem.  Leave commented out for now but delete in 
    1867 #    a code cleanup once clear it really is no longer used. 
    1868 #    PDB  8 April 2014 
    1869  
    1870 #    def _set_model_sizer_selection(self, model): 
    1871 #        """ 
    1872 #        Display the sizer according to the type of the current model 
    1873 #        """ 
    1874 #        if model == None: 
    1875 #            return 
    1876 #        if hasattr(model, "s_model"): 
    1877 #             
    1878 #            class_name = model.s_model.__class__ 
    1879 #            name = model.s_model.name 
    1880 #            flag = (name != "NoStructure") 
    1881 #            if flag and \ 
    1882 #                (class_name in self.model_list_box["Structure Factors"]): 
    1883 #                self.structurebox.Show() 
    1884 #                self.text2.Show() 
    1885 #                self.structurebox.Enable() 
    1886 #               self.text2.Enable() 
    1887  #               items = self.structurebox.GetItems() 
    1888  #               self.sizer1.Layout() 
    1889  #                
    1890  #               for i in range(len(items)): 
    1891  #                   if items[i] == str(name): 
    1892  #                       self.structurebox.SetSelection(i) 
    1893  #                       break 
    1894  #                    
    1895  #       if hasattr(model, "p_model"): 
    1896  #           class_name = model.p_model.__class__ 
    1897  #           name = model.p_model.name 
    1898  #           self.formfactorbox.Clear() 
    1899  #            
    1900  #           for k, list in self.model_list_box.iteritems(): 
    1901  #               if k in["P(Q)*S(Q)", "Shapes"] and \ 
    1902  #                   class_name in self.model_list_box["Shapes"]: 
    1903  #                   self.shape_rbutton.SetValue(True) 
    1904  #                   ## fill the form factor list with new model 
    1905  #                   self._populate_box(self.formfactorbox, 
    1906  #                                      self.model_list_box["Shapes"]) 
    1907  #                   items = self.formfactorbox.GetItems() 
    1908  #                   ## set comboxbox to the selected item 
    1909  #                   for i in range(len(items)): 
    1910  #                       if items[i] == str(name): 
    1911  #                           self.formfactorbox.SetSelection(i) 
    1912  #                           break 
    1913  #                   return 
    1914  #               elif k == "Shape-Independent": 
    1915  #                   self.shape_indep_rbutton.SetValue(True) 
    1916  #               elif k == "Structure Factors": 
    1917  #                   self.struct_rbutton.SetValue(True) 
    1918  #               elif k == "Multi-Functions": 
    1919  #                   continue 
    1920  #               else: 
    1921  #                   self.plugin_rbutton.SetValue(True) 
    1922  #               
    1923  #               if class_name in list: 
    1924  #                   ## fill the form factor list with new model 
    1925  #                   self._populate_box(self.formfactorbox, list) 
    1926  #                   items = self.formfactorbox.GetItems() 
    1927  #                   ## set comboxbox to the selected item 
    1928  #                   for i in range(len(items)): 
    1929  #                       if items[i] == str(name): 
    1930  #                           self.formfactorbox.SetSelection(i) 
    1931  #                           break 
    1932  #                   break 
    1933  #       else: 
    1934             ## Select the model from the menu 
    1935 #            class_name = model.__class__ 
    1936 #            name = model.name 
    1937 #            self.formfactorbox.Clear() 
    1938 #            items = self.formfactorbox.GetItems() 
    1939 #     
    1940 #            for k, list in self.model_list_box.iteritems(): 
    1941 #                if k in["P(Q)*S(Q)", "Shapes"] and \ 
    1942 #                    class_name in self.model_list_box["Shapes"]: 
    1943 #                    if class_name in self.model_list_box["P(Q)*S(Q)"]: 
    1944 #                        self.structurebox.Show() 
    1945 #                        self.text2.Show() 
    1946 #                       self.structurebox.Enable() 
    1947 #                       self.structurebox.SetSelection(0) 
    1948 #                       self.text2.Enable() 
    1949 #                   else: 
    1950 #                        self.structurebox.Hide() 
    1951 #                        self.text2.Hide() 
    1952 #                        self.structurebox.Disable() 
    1953 #                        self.structurebox.SetSelection(0) 
    1954 #                        self.text2.Disable() 
    1955 #                         
    1956 #                    self.shape_rbutton.SetValue(True) 
    1957                     ## fill the form factor list with new model 
    1958 #                    self._populate_box(self.formfactorbox, 
    1959 #                                       self.model_list_box["Shapes"]) 
    1960 #                    items = self.formfactorbox.GetItems() 
    1961 #                    ## set comboxbox to the selected item 
    1962 #                    for i in range(len(items)): 
    1963 #                        if items[i] == str(name): 
    1964 #                            self.formfactorbox.SetSelection(i) 
    1965 #                            break 
    1966 #                    return 
    1967 #                elif k == "Shape-Independent": 
    1968 #                    self.shape_indep_rbutton.SetValue(True) 
    1969 #                elif k == "Structure Factors": 
    1970 #                    self.struct_rbutton.SetValue(True) 
    1971 #                elif k == "Multi-Functions": 
    1972 #                    continue 
    1973 #                else: 
    1974 #                    self.plugin_rbutton.SetValue(True) 
    1975 #                if class_name in list: 
    1976 #                    self.structurebox.SetSelection(0) 
    1977 #                    self.structurebox.Disable() 
    1978 #                    self.text2.Disable() 
    1979                     ## fill the form factor list with new model 
    1980 #                    self._populate_box(self.formfactorbox, list) 
    1981 #                    items = self.formfactorbox.GetItems() 
    1982                     ## set comboxbox to the selected item 
    1983 #                    for i in range(len(items)): 
    1984 #                        if items[i] == str(name): 
    1985 #                            self.formfactorbox.SetSelection(i) 
    1986 #                            break 
    1987 #                    break 
    19881863                 
    19891864    def _draw_model(self, update_chisqr=True, source='model'): 
Note: See TracChangeset for help on using the changeset viewer.