Ignore:
Timestamp:
Aug 18, 2017 3:13:34 PM (4 years ago)
Author:
toby
Message:

put user-defined seq ref var labels into table

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIdataGUI.py

    r3014 r3018  
    66696669        var = colLabels[col]
    66706670        lbl = variableLabels.get(var,G2obj.fmtVarDescr(var))
     6671        head = u'Set a new name for variable {} (column {})'.format(var,col)
    66716672        dlg = G2G.SingleStringDialog(G2frame,'Set variable label',
    6672                                  'Set a new name for variable '+var,lbl,size=(400,-1))
     6673                                 head,lbl,size=(400,-1))
    66736674        if dlg.Show():
    66746675            variableLabels[var] = dlg.GetValue()
    6675         dlg.Destroy()
     6676            dlg.Destroy()
     6677            wx.CallAfter(UpdateSeqResults,G2frame,data) # redisplay variables
     6678        else:
     6679            dlg.Destroy()
    66766680
    66776681    def DoSequentialExport(event):
     
    71247128            del G2frame.colSigs[l]
    71257129
     7130    # make a copy of the column labels substituting alternate labels when defined
     7131    displayLabels = colLabels[:]
     7132    for i,l in enumerate(colLabels):
     7133        if l in variableLabels:
     7134            displayLabels[i] = variableLabels[l]
     7135           
    71267136    G2frame.dataWindow.ClearData()
    71277137    G2frame.dataWindow.currentGrids = []
     
    71307140    G2frame.dataWindow.GetSizer().Add(G2frame.dataDisplay,1,wx.ALL|wx.EXPAND)
    71317141    G2frame.SeqTable = G2G.Table([list(cl) for cl in zip(*G2frame.colList)],     # convert from columns to rows
    7132         colLabels=colLabels,rowLabels=histNames,types=Types)
     7142        colLabels=displayLabels,rowLabels=histNames,types=Types)
    71337143    G2frame.dataDisplay.SetTable(G2frame.SeqTable, True)
    71347144    G2frame.dataDisplay.EnableEditing(False)
Note: See TracChangeset for help on using the changeset viewer.