Changeset 6ff103a in sasview for src/sas/qtgui/Utilities/GuiUtils.py


Ignore:
Timestamp:
Jul 12, 2018 8:38:48 AM (6 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
18f11a6
Parents:
d0528c4
Message:

CR: Deleting a single dataitem child will close the corresponding plot (SASVIEW-958)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Utilities/GuiUtils.py

    re20870bc r6ff103a  
    415415    assert isinstance(filename, str) 
    416416 
    417     plot_data = [] 
     417    plot_data = {} 
    418418    # Iterate over model looking for named items 
    419419    for index in range(model_item.rowCount()): 
     
    421421        if str(item.text()) == filename: 
    422422            # TODO: assure item type is correct (either data1/2D or Plotter) 
    423             plot_data.append(item.child(0).data()) 
     423            plot_data[item] = item.child(0).data() 
    424424            # Going 1 level deeper only 
    425425            for index_2 in range(item.rowCount()): 
     
    427427                if item_2 and item_2.isCheckable(): 
    428428                    # TODO: assure item type is correct (either data1/2D or Plotter) 
    429                     plot_data.append(item_2.child(0).data()) 
     429                    plot_data[item_2] = item_2.child(0).data() 
    430430 
    431431    return plot_data 
Note: See TracChangeset for help on using the changeset viewer.