Changeset 2657


Ignore:
Timestamp:
Jan 22, 2017 5:00:14 PM (5 years ago)
Author:
toby
Message:

deal with dead grids

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIgrid.py

    r2656 r2657  
    40114011    depVarDict.update({var:val for var,val in data[name].get('newCellDict',{}).values()})
    40124012
     4013    G2frame.dataFrame.currentGrids = []
    40134014    G2frame.dataDisplay = G2G.GSGrid(parent=G2frame.dataFrame)
    40144015    G2frame.SeqTable = G2G.Table(
     
    44294430        # save or finish processing of outstanding events
    44304431        for grid in G2frame.dataFrame.currentGrids:  # complete any open wx.Grid edits
    4431             if grid.IsCellEditControlEnabled(): # complete any grid edits in progress
    4432                 if GSASIIpath.GetConfigValue('debug'): print 'Completing grid edit in',grid
    4433                 grid.HideCellEditControl()
    4434                 grid.DisableCellEditControl()
     4432            #if GSASIIpath.GetConfigValue('debug'): print 'Testing grid edit in',grid
     4433            try:
     4434                if grid.IsCellEditControlEnabled(): # complete any grid edits in progress
     4435                    if GSASIIpath.GetConfigValue('debug'): print 'Completing grid edit in',grid
     4436                    grid.HideCellEditControl()
     4437                    grid.DisableCellEditControl()
     4438            except:
     4439                pass
    44354440        if G2frame.dataFrame.GetLabel() == 'Comments': # save any recently entered comments
    44364441            try:
  • trunk/GSASIIpwdGUI.py

    r2654 r2657  
    879879    G2frame.PeakTable = G2G.Table(data['peaks'],rowLabels=rowLabels,colLabels=colLabels,types=Types)
    880880    G2frame.dataFrame.SetLabel('Peak List')
     881    G2frame.dataFrame.currentGrids = []
    881882    G2frame.dataDisplay = G2G.GSGrid(parent=G2frame.dataFrame)
    882883    G2frame.dataDisplay.SetTable(G2frame.PeakTable, True)
     
    904905    if 'nPeaks' not in data[1]:
    905906        data[1].update({'nPeaks':0,'peaksList':[]})
     907    G2frame.dataFrame.currentGrids = []
    906908   
    907909    def OnBackFlagCopy(event):
     
    12391241        topSizer.Add((5,0),0)
    12401242        peaksSizer.Add(topSizer)
     1243        G2frame.dataFrame.currentGrids = []
    12411244        if data[1]['nPeaks']:
    12421245            peaksSizer.Add(wx.StaticText(G2frame.dataDisplay,-1,' Peak list:'),0,WACV)       
     
    26212624    G2frame.IndexPeaksTable = G2G.Table(data[0],rowLabels=rowLabels,colLabels=colLabels,types=Types)
    26222625    G2frame.dataFrame.SetLabel('Index Peak List')
     2626    G2frame.dataFrame.currentGrids = []
    26232627    G2frame.dataDisplay = G2G.GSGrid(parent=G2frame.dataFrame)               
    26242628    G2frame.dataDisplay.SetTable(G2frame.IndexPeaksTable, True)
     
    33003304        mainSizer.Add(ssSizer,0)
    33013305
     3306    G2frame.dataFrame.currentGrids = []
    33023307    if cells:
    33033308        mainSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label='\n Indexing Result:'),0,WACV)
     
    35873592    G2frame.dataDisplay = G2G.GSNoteBook(parent=G2frame.dataFrame,size=G2frame.dataFrame.GetClientSize())
    35883593    G2frame.refTable = {}
     3594    G2frame.dataFrame.currentGrids = []
    35893595    for tabnum,phase in enumerate(phases):
    35903596        if len(data[phase]):
Note: See TracChangeset for help on using the changeset viewer.