Changeset 1827 for trunk


Ignore:
Timestamp:
Apr 30, 2015 2:38:20 PM (10 years ago)
Author:
toby
Message:

fix scrollbar problems in many places; phase data in particular

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/GSASIIconstrGUI.py

    r1770 r1827  
    15011501                refChoice[rbId][i].sort()     
    15021502           
    1503         VectorRB.DestroyChildren()
     1503        #VectorRB.DestroyChildren() # bad, deletes scrollbars on Mac!
     1504        if VectorRB.GetSizer():
     1505            VectorRB.GetSizer().Clear(True)
    15041506        VectorRBDisplay = wx.Panel(VectorRB)
    15051507        VectorRBSizer = wx.BoxSizer(wx.VERTICAL)
     
    17791781                refChoice[rbId][i].sort()     
    17801782           
    1781         ResidueRB.DestroyChildren()
     1783        #ResidueRB.DestroyChildren() # bad, deletes scrollbars on Mac!
     1784        if ResidueRB.GetSizer():
     1785            ResidueRB.GetSizer().Clear(True)
    17821786        ResidueRBDisplay = wx.Panel(ResidueRB)
    17831787        ResidueRBSizer = wx.BoxSizer(wx.VERTICAL)
  • TabularUnified trunk/GSASIIddataGUI.py

    r1826 r1827  
    7272    if not hist and len(keyList):
    7373        DData.G2hist = keyList[0]
     74    elif hist:
     75        DData.G2hist = hist
    7476
    7577    PWDR = any(['PWDR' in item for item in keyList])
     
    8284            generalData['Data plot type'] = Obj.GetStringSelection()
    8385            G2plt.PlotSizeStrainPO(G2frame,data,DData.G2hist)
    84             wx.CallLater(100,UpdateDData,G2frame,DData,data)
    85 #            wx.CallLater(100,RepaintHistogramInfo)
     86            wx.CallLater(100,UpdateDData,G2frame,DData,data,DData.G2hist)
    8687           
    8788        def OnPOhkl(event):
     
    101102        plotSizer = wx.BoxSizer(wx.VERTICAL)
    102103        choice = ['None','Mustrain','Size','Preferred orientation']
    103         plotSel = wx.RadioBox(DData,-1,'Select plot type:',choices=choice,
     104        plotSel = wx.RadioBox(DData,wx.ID_ANY,'Select plot type:',choices=choice,
    104105            majorDimension=1,style=wx.RA_SPECIFY_COLS)
    105106        plotSel.SetStringSelection(generalData['Data plot type'])
     
    108109        if generalData['Data plot type'] == 'Preferred orientation':
    109110            POhklSizer = wx.BoxSizer(wx.HORIZONTAL)
    110             POhklSizer.Add(wx.StaticText(DData,-1,' Plot preferred orientation for H K L: '),0,WACV)
     111            POhklSizer.Add(wx.StaticText(DData,wx.ID_ANY,' Plot preferred orientation for H K L: '),0,WACV)
    111112            h,k,l = generalData['POhkl']
    112             poAxis = wx.TextCtrl(DData,-1,'%3d %3d %3d'%(h,k,l),style=wx.TE_PROCESS_ENTER)
     113            poAxis = wx.TextCtrl(DData,wx.ID_ANY,'%3d %3d %3d'%(h,k,l),style=wx.TE_PROCESS_ENTER)
    113114            poAxis.Bind(wx.EVT_TEXT_ENTER,OnPOhkl)
    114115            poAxis.Bind(wx.EVT_KILL_FOCUS,OnPOhkl)
     
    135136        scaleSizer = wx.BoxSizer(wx.HORIZONTAL)
    136137        if 'PWDR' in DData.G2hist:
    137             scaleRef = wx.CheckBox(DData,-1,label=' Phase fraction: ')
     138            scaleRef = wx.CheckBox(DData,wx.ID_ANY,label=' Phase fraction: ')
    138139        elif 'HKLF' in DData.G2hist:
    139             scaleRef = wx.CheckBox(DData,-1,label=' Scale factor: ')               
     140            scaleRef = wx.CheckBox(DData,wx.ID_ANY,label=' Scale factor: ')               
    140141        scaleRef.SetValue(UseList[DData.G2hist]['Scale'][1])
    141142        scaleRef.Bind(wx.EVT_CHECKBOX, OnScaleRef)
     
    174175        UseList[DData.G2hist]['Size'][0] = Obj.GetValue()
    175176        G2plt.PlotSizeStrainPO(G2frame,data,DData.G2hist)
    176         #wx.CallLater(100,UpdateDData,G2frame,DData,data)
    177177        wx.CallLater(100,RepaintHistogramInfo)
    178178       
     
    235235                UseList[item]['Size'][4][i+3] = 0.0
    236236        G2plt.PlotSizeStrainPO(G2frame,data,item)
    237         #wx.CallLater(100,UpdateDData,G2frame,DData,data)
    238237        wx.CallLater(100,RepaintHistogramInfo)
    239238           
     
    241240        Obj = event.GetEventObject()
    242241        UseList[DData.G2hist]['Mustrain'][0] = Obj.GetValue()
    243         #wx.CallLater(100,UpdateDData,G2frame,DData,data)
    244242        G2plt.PlotSizeStrainPO(G2frame,data,DData.G2hist)
    245243        wx.CallLater(100,RepaintHistogramInfo)
     
    306304                UseList[item]['Mustrain'][4][i] = vals[i]
    307305        G2plt.PlotSizeStrainPO(G2frame,data,item)
    308         #wx.CallLater(100,UpdateDData,G2frame,DData,data)
    309306        wx.CallLater(100,RepaintHistogramInfo)
    310307           
     
    353350        UseList[DData.G2hist]['Pref.Ori.'][4] = Order
    354351        UseList[DData.G2hist]['Pref.Ori.'][5] = SetPOCoef(Order,DData.G2hist)
    355         #wx.CallLater(100,UpdateDData,G2frame,DData,data)
    356352        wx.CallLater(100,RepaintHistogramInfo)
    357353
     
    362358        else:
    363359            UseList[DData.G2hist]['Pref.Ori.'][0] = 'SH'
    364         #wx.CallLater(100,UpdateDData,G2frame,DData,data)
    365360        wx.CallLater(100,RepaintHistogramInfo)
    366361
     
    448443        item = Indx[Obj.GetId()]
    449444        UseList[item[0]]['Extinction'][item[1]] = Obj.GetValue()
    450         #wx.CallLater(100,UpdateDData,G2frame,DData,data)
    451445        wx.CallLater(100,RepaintHistogramInfo)
    452446           
     
    458452    def TopSizer(name,choices,parm,OnType):
    459453        topSizer = wx.BoxSizer(wx.HORIZONTAL)
    460         topSizer.Add(wx.StaticText(DData,-1,name),0,WACV)
     454        topSizer.Add(wx.StaticText(DData,wx.ID_ANY,name),0,WACV)
    461455        sizeType = wx.ComboBox(DData,wx.ID_ANY,value=UseList[DData.G2hist][parm][0],choices=choices,
    462456            style=wx.CB_READONLY|wx.CB_DROPDOWN)
     
    467461    def LGmixSizer(name,OnVal,OnRef):
    468462        lgmixSizer = wx.BoxSizer(wx.HORIZONTAL)
    469         lgmixRef = wx.CheckBox(DData,-1,label='LGmix')
     463        lgmixRef = wx.CheckBox(DData,wx.ID_ANY,label='LGmix')
    470464        lgmixRef.thisown = False
    471465        lgmixRef.SetValue(UseList[DData.G2hist][name][2][2])
     
    483477    def ResetSizer(name,OnReset):
    484478        resetSizer = wx.BoxSizer(wx.HORIZONTAL)
    485         reset = wx.CheckBox(DData,-1,label='Reset?')
     479        reset = wx.CheckBox(DData,wx.ID_ANY,label='Reset?')
    486480        reset.thisown = False
    487481        reset.SetValue(False)
     
    493487    def IsoSizer(name,parm,fmt,OnVal,OnRef):
    494488        isoSizer = wx.BoxSizer(wx.HORIZONTAL)
    495         sizeRef = wx.CheckBox(DData,-1,label=name)
     489        sizeRef = wx.CheckBox(DData,wx.ID_ANY,label=name)
    496490        sizeRef.thisown = False
    497491        sizeRef.SetValue(UseList[DData.G2hist][parm][2][0])
     
    509503    def UniSizer(parm,OnAxis):
    510504        uniSizer = wx.BoxSizer(wx.HORIZONTAL)
    511         uniSizer.Add(wx.StaticText(DData,-1,' Unique axis, H K L: '),0,WACV)
     505        uniSizer.Add(wx.StaticText(DData,wx.ID_ANY,' Unique axis, H K L: '),0,WACV)
    512506        h,k,l = UseList[DData.G2hist][parm][3]
    513         Axis = wx.TextCtrl(DData,-1,'%3d %3d %3d'%(h,k,l),style=wx.TE_PROCESS_ENTER)
     507        Axis = wx.TextCtrl(DData,wx.ID_ANY,'%3d %3d %3d'%(h,k,l),style=wx.TE_PROCESS_ENTER)
    514508        Axis.Bind(wx.EVT_TEXT_ENTER,OnAxis)
    515509        Axis.Bind(wx.EVT_KILL_FOCUS,OnAxis)
     
    522516            UseList[DData.G2hist][parm][1],UseList[DData.G2hist][parm][2],range(2))
    523517        for Pa,val,ref,id in parms:
    524             sizeRef = wx.CheckBox(DData,-1,label=Pa)
     518            sizeRef = wx.CheckBox(DData,wx.ID_ANY,label=Pa)
    525519            sizeRef.thisown = False
    526520            sizeRef.SetValue(ref)
     
    540534        dataSizer = wx.FlexGridSizer(0,6,5,5)
    541535        for Pa,val,ref,id in parms:
    542             sizeRef = wx.CheckBox(DData,-1,label=Pa)
     536            sizeRef = wx.CheckBox(DData,wx.ID_ANY,label=Pa)
    543537            sizeRef.thisown = False
    544538            sizeRef.SetValue(ref)
     
    562556        dataSizer = wx.FlexGridSizer(0,6,5,5)
    563557        for Pa,val,ref,id in parms:
    564             strainRef = wx.CheckBox(DData,-1,label=Pa)
     558            strainRef = wx.CheckBox(DData,wx.ID_ANY,label=Pa)
    565559            strainRef.thisown = False
    566560            strainRef.SetValue(ref)
     
    580574        parms = zip(Hsnames,UseList[DData.G2hist]['HStrain'][0],UseList[DData.G2hist]['HStrain'][1],range(len(Hsnames)))
    581575        for Pa,val,ref,id in parms:
    582             hstrainRef = wx.CheckBox(DData,-1,label=Pa)
     576            hstrainRef = wx.CheckBox(DData,wx.ID_ANY,label=Pa)
    583577            hstrainRef.thisown = False
    584578            hstrainRef.SetValue(ref)
     
    597591        choice = ['March-Dollase','Spherical harmonics']
    598592        POtype = choice[['MD','SH'].index(POData[0])]
    599         poSizer.Add(wx.StaticText(DData,-1,' Preferred orientation model '),0,WACV)
     593        poSizer.Add(wx.StaticText(DData,wx.ID_ANY,' Preferred orientation model '),0,WACV)
    600594        POType = wx.ComboBox(DData,wx.ID_ANY,value=POtype,choices=choice,
    601595            style=wx.CB_READONLY|wx.CB_DROPDOWN)
     
    603597        poSizer.Add(POType)
    604598        if POData[0] == 'SH':
    605             poSizer.Add(wx.StaticText(DData,-1,' Harmonic order: '),0,WACV)
     599            poSizer.Add(wx.StaticText(DData,wx.ID_ANY,' Harmonic order: '),0,WACV)
    606600            poOrder = wx.ComboBox(DData,wx.ID_ANY,value=str(POData[4]),choices=[str(2*i) for i in range(18)],
    607601                style=wx.CB_READONLY|wx.CB_DROPDOWN)
    608602            poOrder.Bind(wx.EVT_COMBOBOX,OnPOOrder)
    609603            poSizer.Add(poOrder,0,WACV)
    610             poRef = wx.CheckBox(DData,-1,label=' Refine? ')
     604            poRef = wx.CheckBox(DData,wx.ID_ANY,label=' Refine? ')
    611605            poRef.SetValue(POData[2])
    612606            poRef.Bind(wx.EVT_CHECKBOX,OnPORef)
     
    616610    def MDDataSizer(POData):
    617611        poSizer = wx.BoxSizer(wx.HORIZONTAL)
    618         poRef = wx.CheckBox(DData,-1,label=' March-Dollase ratio: ')
     612        poRef = wx.CheckBox(DData,wx.ID_ANY,label=' March-Dollase ratio: ')
    619613        poRef.SetValue(POData[2])
    620614        poRef.Bind(wx.EVT_CHECKBOX,OnPORef)
     
    625619        poVal.Bind(wx.EVT_KILL_FOCUS,OnPOVal)
    626620        poSizer.Add(poVal,0,WACV)
    627         poSizer.Add(wx.StaticText(DData,-1,' Unique axis, H K L: '),0,WACV)
     621        poSizer.Add(wx.StaticText(DData,wx.ID_ANY,' Unique axis, H K L: '),0,WACV)
    628622        h,k,l =POData[3]
    629         poAxis = wx.TextCtrl(DData,-1,'%3d %3d %3d'%(h,k,l),style=wx.TE_PROCESS_ENTER)
     623        poAxis = wx.TextCtrl(DData,wx.ID_ANY,'%3d %3d %3d'%(h,k,l),style=wx.TE_PROCESS_ENTER)
    630624        poAxis.Bind(wx.EVT_TEXT_ENTER,OnPOAxis)
    631625        poAxis.Bind(wx.EVT_KILL_FOCUS,OnPOAxis)
     
    651645        ODFkeys.sort()
    652646        for odf in ODFkeys:
    653             ODFSizer.Add(wx.StaticText(DData,-1,odf),0,WACV)
     647            ODFSizer.Add(wx.StaticText(DData,wx.ID_ANY,odf),0,WACV)
    654648            ODFval = wx.TextCtrl(DData,wx.ID_ANY,'%8.3f'%(POData[5][odf]),style=wx.TE_PROCESS_ENTER)
    655649            ODFIndx[ODFval.GetId()] = odf
     
    673667            finally:
    674668                dlg.Destroy()
    675             #wx.CallLater(100,UpdateDData,G2frame,DData,data)
    676669            wx.CallLater(100,RepaintHistogramInfo)
    677670           
     
    687680        hkls = G2lat.GenPfHKLs(10,SGData,A)   
    688681        shPenalty = wx.BoxSizer(wx.HORIZONTAL)
    689         shPenalty.Add(wx.StaticText(DData,-1,' Negative MRD penalty list: '),0,WACV)
     682        shPenalty.Add(wx.StaticText(DData,wx.ID_ANY,' Negative MRD penalty list: '),0,WACV)
    690683        shPenalty.Add(wx.ComboBox(DData,value=POData[6][0],choices=POData[6],
    691684            style=wx.CB_DROPDOWN),0,WACV)
     
    693686        hklList.Bind(wx.EVT_BUTTON,OnHKLList)
    694687        shPenalty.Add(hklList,0,WACV)
    695         shPenalty.Add(wx.StaticText(DData,-1,' Zero MRD tolerance: '),0,WACV)
    696         shToler = wx.TextCtrl(DData,-1,'%.2f'%(POData[7]),style=wx.TE_PROCESS_ENTER)
     688        shPenalty.Add(wx.StaticText(DData,wx.ID_ANY,' Zero MRD tolerance: '),0,WACV)
     689        shToler = wx.TextCtrl(DData,wx.ID_ANY,'%.2f'%(POData[7]),style=wx.TE_PROCESS_ENTER)
    697690        shToler.Bind(wx.EVT_TEXT_ENTER,OnshToler)
    698691        shToler.Bind(wx.EVT_KILL_FOCUS,OnshToler)
     
    702695    def ExtSizer():           
    703696        extSizer = wx.BoxSizer(wx.HORIZONTAL)
    704         extRef = wx.CheckBox(DData,-1,label=' Extinction: ')
     697        extRef = wx.CheckBox(DData,wx.ID_ANY,label=' Extinction: ')
    705698        extRef.SetValue(UseList[DData.G2hist]['Extinction'][1])
    706699        extRef.Bind(wx.EVT_CHECKBOX, OnExtRef)
     
    716709        extSizer = wx.BoxSizer(wx.VERTICAL)
    717710        typeSizer = wx.BoxSizer(wx.HORIZONTAL)           
    718         typeSizer.Add(wx.StaticText(DData,-1,' Extinction type: '),0,WACV)
     711        typeSizer.Add(wx.StaticText(DData,wx.ID_ANY,' Extinction type: '),0,WACV)
    719712        Choices = ['None','Primary','Secondary Type I','Secondary Type II',]    # remove 'Secondary Type I & II'
    720         typeTxt = wx.ComboBox(DData,-1,choices=Choices,value=UseList[DData.G2hist]['Extinction'][1],
     713        typeTxt = wx.ComboBox(DData,wx.ID_ANY,choices=Choices,value=UseList[DData.G2hist]['Extinction'][1],
    721714            style=wx.CB_READONLY|wx.CB_DROPDOWN)
    722715        Indx[typeTxt.GetId()] = [DData.G2hist,1]
    723716        typeTxt.Bind(wx.EVT_COMBOBOX,OnSCExtType)
    724717        typeSizer.Add(typeTxt)
    725         typeSizer.Add(wx.StaticText(DData,-1,' Approx: '),0,WACV)
     718        typeSizer.Add(wx.StaticText(DData,wx.ID_ANY,' Approx: '),0,WACV)
    726719        Choices=['Lorentzian','Gaussian']
    727         approxTxT = wx.ComboBox(DData,-1,choices=Choices,value=UseList[DData.G2hist]['Extinction'][0],
     720        approxTxT = wx.ComboBox(DData,wx.ID_ANY,choices=Choices,value=UseList[DData.G2hist]['Extinction'][0],
    728721            style=wx.CB_READONLY|wx.CB_DROPDOWN)
    729722        Indx[approxTxT.GetId()] = [DData.G2hist,0]
     
    736729            if 'Tbar' in UseList[DData.G2hist]['Extinction'][2]:       #skipped for TOF   
    737730                valSizer =wx.BoxSizer(wx.HORIZONTAL)
    738                 valSizer.Add(wx.StaticText(DData,-1,' Tbar(mm):'),0,WACV)
     731                valSizer.Add(wx.StaticText(DData,wx.ID_ANY,' Tbar(mm):'),0,WACV)
    739732                tbarVal = wx.TextCtrl(DData,wx.ID_ANY,
    740733                    '%.3f'%(UseList[DData.G2hist]['Extinction'][2]['Tbar']),style=wx.TE_PROCESS_ENTER)
     
    742735                tbarVal.Bind(wx.EVT_KILL_FOCUS,OnTbarVal)
    743736                valSizer.Add(tbarVal,0,WACV)
    744                 valSizer.Add(wx.StaticText(DData,-1,' cos(2ThM):'),0,WACV)
     737                valSizer.Add(wx.StaticText(DData,wx.ID_ANY,' cos(2ThM):'),0,WACV)
    745738                cos2tm = wx.TextCtrl(DData,wx.ID_ANY,
    746739                    '%.3f'%(UseList[DData.G2hist]['Extinction'][2]['Cos2TM']),style=wx.TE_PROCESS_ENTER)
     
    759752                Ekey = ['Eg','Es']
    760753            for ekey in Ekey:
    761                 Eref = wx.CheckBox(DData,-1,label=ekey+' : ')
     754                Eref = wx.CheckBox(DData,wx.ID_ANY,label=ekey+' : ')
    762755                Eref.SetValue(UseList[DData.G2hist]['Extinction'][2][ekey][1])
    763756                Indx[Eref.GetId()] = [DData.G2hist,ekey]
     
    777770        babSizer = wx.BoxSizer(wx.HORIZONTAL)
    778771        for bab in ['A','U']:
    779             babRef = wx.CheckBox(DData,-1,label=' Babinet '+bab+': ')
     772            babRef = wx.CheckBox(DData,wx.ID_ANY,label=' Babinet '+bab+': ')
    780773            babRef.SetValue(UseList[DData.G2hist]['Babinet']['Bab'+bab][1])
    781774            Indx[babRef.GetId()] = [DData.G2hist,bab]
     
    809802        G2frame.bottomSizer = ShowHistogramInfo()
    810803        mainSizer.Add(G2frame.bottomSizer)
    811         #scrollbars initially set in G2phsGUI.SetPhaseWindow(G2frame.dataFrame,DData,mainSizer)
    812         #phasePage.SetSize(Size)
    813         #phasePage.SetScrollbars(10,10,Size[0]/10-4,Size[1]/10-1)
    814         #mainFrame.setSizePosLeft(Size)
    815804        mainSizer.Layout()
    816         #G2frame.dataFrame.Layout()
    817         #G2frame.dataFrame.SendSizeEvent()
    818805        G2frame.dataFrame.Refresh()
     806        DData.SetVirtualSize(mainSizer.GetMinSize())
     807        G2frame.dataFrame.SendSizeEvent()
    819808       
    820809    def ShowHistogramInfo():
     
    831820        bottomSizer = wx.BoxSizer(wx.VERTICAL)
    832821        showSizer = wx.BoxSizer(wx.HORIZONTAL)
    833         useData = wx.CheckBox(DData,-1,label='Use Histogram: '+DData.G2hist+' ?')
     822        useData = wx.CheckBox(DData,wx.ID_ANY,label='Use Histogram: '+DData.G2hist+' ?')
    834823        showSizer.Add(useData,0,WACV|wx.TOP|wx.BOTTOM,5)
    835824        useData.Bind(wx.EVT_CHECKBOX, OnUseData)
     
    896885                bottomSizer.Add(GenStrainDataSizer(),0,WACV|wx.BOTTOM,5)
    897886           
    898             bottomSizer.Add(wx.StaticText(DData,-1,' Hydrostatic/elastic strain:'))
     887            bottomSizer.Add(wx.StaticText(DData,wx.ID_ANY,' Hydrostatic/elastic strain:'))
    899888            bottomSizer.Add(HstrainSizer())
    900889               
     
    914903                if POData[4]:       #SH order > 0
    915904                    textJ = G2lat.textureIndex(POData[5])
    916                     poSizer.Add(wx.StaticText(DData,-1,' Spherical harmonic coefficients: '+'Texture index: %.3f'%(textJ))
     905                    poSizer.Add(wx.StaticText(DData,wx.ID_ANY,' Spherical harmonic coefficients: '+'Texture index: %.3f'%(textJ))
    917906                        ,0,WACV|wx.TOP|wx.BOTTOM,5)
    918907                    poSizer.Add(SHDataSizer(POData),0,WACV|wx.TOP|wx.BOTTOM,5)
     
    928917        return bottomSizer
    929918               
    930     DData.DestroyChildren()
     919    #DData.DestroyChildren() # bad, deletes scrollbars on Mac!
    931920    if DData.GetSizer():
    932921        DData.GetSizer().Clear(True)
    933     if not UseList:
    934         return
    935922    mainSizer = wx.BoxSizer(wx.VERTICAL)
    936     mainSizer.Add(wx.StaticText(DData,-1,' Histogram data for '+PhaseName+':'),0,WACV)
     923    mainSizer.Add(wx.StaticText(DData,wx.ID_ANY,' Histogram data for '+PhaseName+':'),0,WACV)
    937924    if DData.G2hist != '':
    938925        topSizer = wx.FlexGridSizer(1,2,5,5)
     
    954941        G2frame.bottomSizer = ShowHistogramInfo()
    955942        mainSizer.Add(G2frame.bottomSizer)
     943    elif not UseList:
     944        mainSizer.Add(wx.StaticText(DData,wx.ID_ANY,'  (This phase has no associated data, use appropriate Edit/Add... menu item)'),
     945                      0,WACV|wx.TOP,10)
     946       
    956947    G2phsGUI.SetPhaseWindow(G2frame.dataFrame,DData,mainSizer)
  • TabularUnified trunk/GSASIIphsGUI.py

    r1823 r1827  
    240240        """       
    241241        # UpdateGeneral execution starts here
    242         General.DestroyChildren()
     242        #General.DestroyChildren() # bad, deletes scrollbars on Mac!
     243        if General.GetSizer():
     244            General.GetSizer().Clear(True)
    243245        phaseTypes = ['nuclear','modulated','magnetic','macromolecular']
    244246        SetupGeneral()
     
    36133615
    36143616        # UpdateTexture executable starts here
    3615         Texture.DestroyChildren()
     3617        #Texture.DestroyChildren() # bad, deletes scrollbars on Mac!
     3618        if Texture.GetSizer():
     3619            Texture.GetSizer().Clear(True)
    36163620        G2frame.dataFrame.SetStatusText('')
    36173621        generalData = data['General']       
     
    42734277        # FillRigidBodyGrid executable code starts here
    42744278        if refresh:
    4275             RigidBodies.DestroyChildren()
     4279            #RigidBodies.DestroyChildren() # bad, deletes scrollbars on Mac!
     4280            if RigidBodies.GetSizer():
     4281                RigidBodies.GetSizer().Clear(True)
    42764282        general = data['General']
    42774283        cx,ct,cs,cia = general['AtomPtrs']
     
    45274533                G2plt.PlotStructure(G2frame,data)
    45284534                   
    4529             RigidBodies.DestroyChildren()
     4535            #RigidBodies.DestroyChildren() # bad, deletes scrollbars on Mac!
     4536            if RigidBodies.GetSizer():
     4537                RigidBodies.GetSizer().Clear(True)
    45304538            mainSizer = wx.BoxSizer(wx.VERTICAL)
    45314539            mainSizer.Add((5,5),0)
     
    51385146       
    51395147        # UpdateMCSA executable code starts here
    5140         G2frame.MCSA.DestroyChildren()
     5148        #G2frame.MCSA.DestroyChildren() # bad, deletes scrollbars on Mac!
     5149        if G2frame.MCSA.GetSizer():
     5150            G2frame.MCSA.GetSizer().Clear(True)
    51415151        if not data['Drawing']:                 #if new drawing - no drawing data!
    51425152            SetupDrawingData()
  • TabularUnified trunk/GSASIIpwdGUI.py

    r1820 r1827  
    34143414    wave = G2mth.getWave(Inst)
    34153415    if G2frame.dataDisplay:
    3416         G2frame.dataFrame.DestroyChildren()
     3416        G2frame.dataFrame.DestroyChildren()  # is this a ScrolledWindow? If so, bad!
    34173417    G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.SubstanceMenu)
    34183418    if not G2frame.dataFrame.GetStatusBar():
     
    40904090        Profile[5] = BackSample['Scale'][0]*G2frame.PatternTree.GetItemPyData(BackId)[1][1]
    40914091    if G2frame.dataDisplay:
    4092         G2frame.dataFrame.DestroyChildren()
     4092        G2frame.dataFrame.DestroyChildren()   # is this a ScrolledWindow? If so, bad!
    40934093    G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.ModelMenu)
    40944094    if not G2frame.dataFrame.GetStatusBar():
Note: See TracChangeset for help on using the changeset viewer.