Changeset 706bb4e in sasview for src/sas/sasgui/plottools


Ignore:
Timestamp:
Sep 18, 2017 10:20:29 AM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
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, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
60a7820
Parents:
460d3a1 (diff), cfd27dd (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into ticket-887-reorg

Location:
src/sas/sasgui/plottools
Files:
3 edited

Legend:

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

    r45dffa69 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 
    248         if  selected_plottable is not None and selected_color is not None: 
     250        if selected_plottable is not None and selected_color is not None: 
    249251            del self.plottables[selected_plottable] 
     252            plottable.custom_color = selected_color 
    250253            self.plottables[plottable] = selected_color 
    251254 
  • src/sas/sasgui/plottools/__init__.py

    rd7bb526 refe730d  
    1 import config 
    21from PlotPanel import PlotPanel 
    32from plottables import Data1D, Theory1D 
  • src/sas/sasgui/plottools/config.py

    rd7bb526 ra2a1c20  
    3838    import pkg_resources 
    3939    pkg_resources.require("matplotlib>=" + plot_version) 
    40 except: 
     40except ImportError: 
    4141    from distutils.version import LooseVersion as Version 
    4242    if Version(matplotlib.__version__) < Version(plot_version): 
Note: See TracChangeset for help on using the changeset viewer.