Changeset cb4d219 in sasview for src/sas/qtgui/Utilities


Ignore:
Timestamp:
Nov 24, 2017 4:13:11 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:
8f83719f
Parents:
c6fb57c
Message:

Minor layout changes to corfunc. Transformed plots now in Data Explorer. SASVIEW-608

File:
1 edited

Legend:

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

    r0261bc1 rcb4d219  
    243243    """ 
    244244    assert isinstance(item, QtGui.QStandardItem) 
    245     py_update_data = update_data 
    246245 
    247246    # Check if data with the same ID is already present 
     
    250249        if plot_item.isCheckable(): 
    251250            plot_data = plot_item.child(0).data() 
    252             if plot_data.id is not None and plot_data.id == py_update_data.id: 
     251            if plot_data.id is not None and plot_data.id == update_data.id: 
    253252                # replace data section in item 
    254253                plot_item.child(0).setData(update_data) 
    255254                plot_item.setText(name) 
    256                 # Plot title 
    257                 plot_item.child(1).child(0).setText("Title: %s"%name) 
     255                # Plot title if any 
     256                if plot_item.child(1).hasChildren(): 
     257                    plot_item.child(1).child(0).setText("Title: %s"%name) 
    258258                # Force redisplay 
    259259                return 
     
    884884        input = input.replace(",", "") 
    885885 
     886 
    886887def enum(*sequential, **named): 
    887888    """Create an enumeration object from a list of strings""" 
Note: See TracChangeset for help on using the changeset viewer.