Ignore:
Timestamp:
Aug 30, 2017 5:55:36 AM (7 years ago)
Author:
lewis
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.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
7b15990, 729198e
Parents:
0f9ea1c
Message:

Refactor P(Q)*S(Q) plot updating logic, and ensure unsmeared theory is also updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/plottools/plottables.py

    r13991957 r2d9526d  
    239239    def replace(self, plottable): 
    240240        """Replace an existing plottable from the graph""" 
    241         selected_color = None 
     241        # If the user has set a custom color, ensure the new plot is the same color 
     242        selected_color = plottable.custom_color 
    242243        selected_plottable = None 
    243244        for p in self.plottables.keys(): 
    244245            if plottable.id == p.id: 
    245246                selected_plottable = p 
    246                 selected_color = self.plottables[p] 
     247                if selected_color is None: 
     248                    selected_color = self.plottables[p] 
    247249                break 
    248250        if selected_plottable is not None and selected_color is not None: 
Note: See TracChangeset for help on using the changeset viewer.