Changeset 5b144c6 in sasview for src/sas/qtgui/Utilities/GuiUtils.py


Ignore:
Timestamp:
Sep 8, 2018 2:23:48 PM (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:
5d28d6b
Parents:
685602a
git-author:
Piotr Rozyczko <rozyczko@…> (09/08/18 14:21:23)
git-committer:
Piotr Rozyczko <rozyczko@…> (09/08/18 14:23:48)
Message:

Clumsy fix to the single-data, multi-fitpage plotting issue SASVIEW-1018.
Fixed tests after replacing plot_dict indexing from .id to .name

File:
1 edited

Legend:

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

    r339e22b r5b144c6  
    225225    # New plot requested from the GUI manager 
    226226    # Old "NewPlotEvent" 
    227     plotRequestedSignal = QtCore.pyqtSignal(list) 
     227    plotRequestedSignal = QtCore.pyqtSignal(list, int) 
    228228 
    229229    # Plot from file names 
     
    288288    for index in range(item.rowCount()): 
    289289        plot_item = item.child(index) 
    290         if plot_item.isCheckable(): 
    291             plot_data = plot_item.child(0).data() 
    292             if plot_data.id is not None and \ 
    293                    (plot_data.name == update_data.name or plot_data.id == update_data.id): 
     290        if not plot_item.isCheckable(): 
     291            continue 
     292        plot_data = plot_item.child(0).data() 
     293        if plot_data.id is not None and \ 
     294                plot_data.name == update_data.name: 
     295                #(plot_data.name == update_data.name or plot_data.id == update_data.id): 
    294296            # if plot_data.id is not None and plot_data.id == update_data.id: 
    295                 # replace data section in item 
    296                 plot_item.child(0).setData(update_data) 
    297                 plot_item.setText(name) 
    298                 # Plot title if any 
    299                 if plot_item.child(1).hasChildren(): 
    300                     plot_item.child(1).child(0).setText("Title: %s"%name) 
    301                 # Force redisplay 
    302                 return 
     297            # replace data section in item 
     298            plot_item.child(0).setData(update_data) 
     299            plot_item.setText(name) 
     300            # Plot title if any 
     301            if plot_item.child(1).hasChildren(): 
     302                plot_item.child(1).child(0).setText("Title: %s"%name) 
     303            # Force redisplay 
     304            return 
    303305 
    304306    # Create the new item 
Note: See TracChangeset for help on using the changeset viewer.