Ignore:
File:
1 edited

Legend:

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

    rcb4d219 r6cb305a  
    5858    # clean all these module variables and put them into a config class 
    5959    # that can be passed by sasview.py. 
    60     #logging.info(sys.executable) 
    61     #logging.info(str(sys.argv)) 
     60    # logging.info(sys.executable) 
     61    # logging.info(str(sys.argv)) 
    6262    from sas import sasview as sasview 
    6363    app_path = os.path.dirname(sasview.__file__) 
    64     #logging.info("Using application path: %s", app_path) 
     64    # logging.info("Using application path: %s", app_path) 
    6565    return app_path 
    6666 
     
    249249        if plot_item.isCheckable(): 
    250250            plot_data = plot_item.child(0).data() 
    251             if plot_data.id is not None and plot_data.id == update_data.id: 
     251            if plot_data.id is not None and \ 
     252                   (plot_data.name == update_data.name or plot_data.id == update_data.id): 
     253            # if plot_data.id is not None and plot_data.id == update_data.id: 
    252254                # replace data section in item 
    253255                plot_item.child(0).setData(update_data) 
     
    343345    for index in range(model_item.rowCount()): 
    344346        item = model_item.item(index) 
    345         if item.text() == filename and item.isCheckable() and item.checkState() == QtCore.Qt.Checked: 
     347        if item.text() == filename and item.isCheckable() \ 
     348                and item.checkState() == QtCore.Qt.Checked: 
    346349            # Going 1 level deeper only 
    347350            for index_2 in range(item.rowCount()): 
     
    360363 
    361364    # Iterate over model looking for named items 
    362     item = list([i for i in [model_item.item(index) for index in range(model_item.rowCount())] if str(i.text()) == filename]) 
     365    item = list([i for i in [model_item.item(index) 
     366                             for index in range(model_item.rowCount())] 
     367                 if str(i.text()) == filename]) 
    363368    return item[0] if len(item)>0 else None 
    364369 
     
    396401    for index in range(model_item.rowCount()): 
    397402        item = model_item.item(index) 
    398         if item.isCheckable() and item.checkState() == QtCore.Qt.Checked: 
    399             # TODO: assure item type is correct (either data1/2D or Plotter) 
    400             plot_data.append((item, item.child(0).data())) 
     403 
    401404        # Going 1 level deeper only 
    402405        for index_2 in range(item.rowCount()): 
     
    405408                # TODO: assure item type is correct (either data1/2D or Plotter) 
    406409                plot_data.append((item_2, item_2.child(0).data())) 
     410 
     411        if item.isCheckable() and item.checkState() == QtCore.Qt.Checked: 
     412            # TODO: assure item type is correct (either data1/2D or Plotter) 
     413            plot_data.append((item, item.child(0).data())) 
    407414 
    408415    return plot_data 
Note: See TracChangeset for help on using the changeset viewer.