Changeset 9f4f8f4 in sasview for fittingview/src


Ignore:
Timestamp:
Aug 11, 2011 12:09:55 PM (13 years ago)
Author:
Jessica Tumarkin <jtumarki@…>
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:
3d2d54a6
Parents:
643a82a
Message:

committing custom_color stuff that I did not commit earlier

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fittingview/src/sans/perspectives/fitting/fitting.py

    rc21e87b r9f4f8f4  
    6767        self.calc_2D = None 
    6868        self.calc_1D = None 
     69         
     70        self.color_dict = {} 
     71         
    6972        self.fit_thread_list = {} 
    7073        self.residuals = None 
     
    9497        self.sim_page = None 
    9598        self.index_model = 0 
     99        self.test_model_color = None 
    96100        #Create a reader for fit page's state 
    97101        self.state_reader = None  
     
    107111        # Log startup 
    108112        logging.info("Fitting plug-in started")  
     113     
     114    def add_color(self, color, id): 
     115        """ 
     116        adds a color as a key with a plot id as its value to a dictionary 
     117        """ 
     118        self.color_dict[id] = color 
    109119         
    110120    def on_batch_selection(self, flag): 
     
    204214            return [] 
    205215        item = plotpanel.plots[graph.selected_plottable] 
     216        self.test_model_color = item.custom_color 
     217        #print "i'm in fitting - color is",self.test_model_color 
    206218        if item.__class__.__name__ is "Data2D":  
    207219            if hasattr(item,"is_data"): 
     
    14371449            current_pg = self.fit_panel.get_page_by_id(page_id) 
    14381450            title = new_plot.title 
    1439  
     1451            new_plot.custom_color = self.test_model_color 
     1452            #print "just set the new plot color" 
     1453            if new_plot.id in self.color_dict: 
     1454                new_plot.custom_color = self.color_dict[new_plot.id] 
     1455            #print "I HAVE JUST ADDED A NEW COLOR/ID ", new_plot.custom_color 
    14401456            wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, 
    14411457                                            title= str(title))) 
Note: See TracChangeset for help on using the changeset viewer.