Changeset ef01be4 in sasview for src/sas/qtgui/PlotHelper.py


Ignore:
Timestamp:
Dec 2, 2016 4:28:23 AM (7 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
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
Children:
b94889a
Parents:
ded2ce3
Message:

More context menu functionality in plots - SASVIEW-167

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/PlotHelper.py

    • Property mode changed from 100755 to 100644
    r8cb6cd6 ref01be4  
    2828    Deletes an existing plot from the dictionary 
    2929    """ 
    30     assert plot_id in this._plots 
    31     del this._plots[plot_id] 
     30    if plot_id in this._plots: 
     31        del this._plots[plot_id] 
    3232 
    3333def currentPlots(): 
     
    4141    Returns the plot referenced by the ID 
    4242    """ 
    43     assert plot_id in this._plots 
    44  
    45     return this._plots[plot_id] 
     43    return this._plots[plot_id] if plot_id in this._plots else None 
    4644 
    4745def idOfPlot(plot): 
Note: See TracChangeset for help on using the changeset viewer.