Changeset 2934 for branch


Ignore:
Timestamp:
Jul 15, 2017 10:37:57 AM (4 years ago)
Author:
vondreele
Message:

fix display of Substances - wrong mainSizer

Location:
branch/2frame
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branch/2frame/GSASIIdataGUI.py

    r2933 r2934  
    47904790            raise Exception
    47914791        self.Layout()
     4792        self.SetupScrolling()
    47924793        self.SendSizeEvent()
    47934794
  • branch/2frame/GSASIIpwdGUI.py

    r2920 r2934  
    706706            data['peaks'] = G2frame.PeakTable.GetData()[:-nDel]
    707707            G2frame.GPXtree.SetItemPyData(G2frame.PickId,data)
    708             wx.CallAfter(reflGrid.ForceRefresh)
    709708            setBackgroundColors()
    710709        elif colList and (event.GetKeyCode() == 89 or event.GetKeyCode() == 78):
     
    730729            return
    731730        G2plt.PlotPatterns(G2frame,plotType='PWDR')
    732         #wx.CallAfter(G2frame.dataWindow.ForceRefresh) # did not always work
    733731        wx.CallAfter(UpdatePeakGrid,G2frame,data)
    734732           
     
    771769        SelectVars(range(reflGrid.GetNumberRows()))
    772770
    773     def onCellListSClick(event):
    774         '''Called when a peak is selected so that it can be highlighted in the plot
    775         '''
    776         event.Skip()
    777         c =  event.GetRow(),event.GetCol()
    778         if c < 0: # replot except whan a column is selected
    779             wx.CallAfter(G2plt.PlotPatterns,G2frame,plotType='PWDR')
    780        
     771#    def onCellListSClick(event):
     772#        '''Called when a peak is selected so that it can be highlighted in the plot
     773#        '''
     774#        event.Skip()
     775#        c =  event.GetRow(),event.GetCol()
     776#        if c < 0: # replot except whan a column is selected
     777#            wx.CallAfter(G2plt.PlotPatterns,G2frame,plotType='PWDR')
     778#       
    781779    def onCellListDClick(event):
    782780        '''Called after a double-click on a cell label'''
     
    790788            reflGrid.ClearSelection()
    791789            reflGrid.SelectRow(r,True)
    792             wx.CallAfter(G2frame.dataWindow.ForceRefresh)
     790            wx.CallAfter(G2frame.reflGrid.ForceRefresh)
    793791            wx.CallAfter(G2plt.PlotPatterns,G2frame,plotType='PWDR')
    794792        elif c > 0:     #column label: just select it (& redisplay)
     
    878876    reflGrid.Bind(wg.EVT_GRID_CELL_CHANGE, RefreshPeakGrid)
    879877    reflGrid.Bind(wx.EVT_KEY_DOWN, KeyEditPeakGrid)
    880     reflGrid.Bind(wg.EVT_GRID_LABEL_LEFT_CLICK, onCellListSClick)
     878#    reflGrid.Bind(wg.EVT_GRID_LABEL_LEFT_CLICK, onCellListSClick)
    881879#    G2frame.dataWindow.Bind(wg.EVT_GRID_CELL_LEFT_CLICK, onCellListSClick)
    882880    reflGrid.Bind(wg.EVT_GRID_LABEL_LEFT_DCLICK, onCellListDClick)
     
    25232521    limitId = G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId, 'Limits')
    25242522    Limits = G2frame.GPXtree.GetItemPyData(limitId)
     2523   
    25252524    def RefreshIndexPeaksGrid(event):
    25262525        r,c =  event.GetRow(),event.GetCol()
     
    25332532            G2frame.IndexPeaksTable.SetData(peaks)
    25342533            G2frame.GPXtree.SetItemPyData(IndexId,[peaks,data[1]])
    2535 #            G2frame.dataWindow.ForceRefresh()
     2534            G2frame.indxPeaks.ForceRefresh()
    25362535            if 'PKS' in G2frame.GPXtree.GetItemText(G2frame.PatternId):
    25372536                G2plt.PlotPowderLines(G2frame)
     
    25652564            event.Skip(True)
    25662565        elif colList:
    2567             G2frame.dataWindow.ClearSelection()
     2566            G2frame.indxPeaks.ClearSelection()
    25682567            key = event.GetKeyCode()
    25692568            for col in colList:
     
    26272626    G2frame.GPXtree.SetItemPyData(IndexId,data)
    26282627    G2frame.IndexPeaksTable = G2G.Table(data[0],rowLabels=rowLabels,colLabels=colLabels,types=Types)
    2629     #G2frame.SetLabel(G2frame.GetLabel().split('||')[0]+' || '+'Index Peak List')
    26302628    G2frame.SetTitle('Index Peak List')
    26312629    G2frame.dataWindow.currentGrids = []
     
    26562654    G2frame.dataWindow.ClearData()
    26572655    mainSizer = G2frame.dataWindow.GetSizer()
    2658     mainSizer.Add(G2frame.indxPeaks,1,wx.ALL|wx.EXPAND,1)
     2656    mainSizer.Add(G2frame.indxPeaks,0,wx.ALL|wx.EXPAND,1)
     2657    G2frame.dataWindowSetAutoLayout(1)
    26592658    G2frame.dataWindow.SetDataSize()
    26602659
     
    39503949    G2frame.Bind(wx.EVT_MENU, OnDeleteElement, id=G2G.wxID_ELEMENTDELETE)
    39513950    G2frame.dataWindow.ClearData()
    3952     mainSizer = wx.BoxSizer(wx.VERTICAL)
     3951    mainSizer = G2frame.dataWindow.GetSizer()
    39533952    mainSizer.Add(SubstSizer(),0)
    39543953    G2frame.dataWindow.SetDataSize()
Note: See TracChangeset for help on using the changeset viewer.