Changeset 6ff103a in sasview


Ignore:
Timestamp:
Jul 12, 2018 6:38:48 AM (3 months ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_Pr_fixes, ESS_GUI_iss879, ESS_GUI_project_save
Children:
18f11a6
Parents:
d0528c4
Message:

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

Location:
src/sas/qtgui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/MainWindow/DataExplorer.py

    rd9150d8 r6ff103a  
    496496        # Now query the model item for available plots 
    497497        plots = GuiUtils.plotsFromFilename(filename, model) 
    498         item = GuiUtils.itemFromFilename(filename, model) 
    499498 
    500499        new_plots = [] 
    501         for plot in plots: 
     500        for item, plot in plots.items(): 
    502501            plot_id = plot.id 
    503502            if plot_id in list(self.active_plots.keys()): 
  • src/sas/qtgui/Utilities/GuiUtils.py

    re20870b 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.