Ignore:
Timestamp:
Jul 6, 2017 3:09:41 PM (4 years ago)
Author:
toby
Message:

implement restraint tab selection menu; fix restraint scroll bar problem (remove/comment all DestroyChildren?); consolidate menu generation

File:
1 edited

Legend:

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

    r2912 r2913  
    12441244        """       
    12451245        # UpdateGeneral execution starts here
    1246         #General.DestroyChildren() # bad, deletes scrollbars on Mac!
    1247         if General.GetSizer():
    1248             General.GetSizer().Clear(True)
     1246        if General.GetSizer(): General.GetSizer().Clear(True)
    12491247        phaseTypes = ['nuclear','magnetic','macromolecular','faulted']
    12501248        SetupGeneral()
     
    63456343       
    63466344        # UpdateTexture executable starts here
    6347         #Texture.DestroyChildren() # bad, deletes scrollbars on Mac!
    6348         if Texture.GetSizer():
    6349             Texture.GetSizer().Clear(True)
     6345        if Texture.GetSizer(): Texture.GetSizer().Clear(True)
    63506346        G2frame.GetStatusBar().SetStatusText('')
    63516347        generalData = data['General']       
     
    70977093        # FillRigidBodyGrid executable code starts here
    70987094        if refresh:
    7099             #RigidBodies.DestroyChildren() # bad, deletes scrollbars on Mac!
    7100             if RigidBodies.GetSizer():
    7101                 RigidBodies.GetSizer().Clear(True)
     7095            if RigidBodies.GetSizer(): RigidBodies.GetSizer().Clear(True)
    71027096        general = data['General']
    71037097        cx,ct,cs,cia = general['AtomPtrs']
     
    73737367                G2plt.PlotStructure(G2frame,data)
    73747368                   
    7375             #RigidBodies.DestroyChildren() # bad, deletes scrollbars on Mac!
    7376             if RigidBodies.GetSizer():
    7377                 RigidBodies.GetSizer().Clear(True)
     7369            if RigidBodies.GetSizer(): RigidBodies.GetSizer().Clear(True)
    73787370            mainSizer = wx.BoxSizer(wx.VERTICAL)
    73797371            mainSizer.Add((5,5),0)
     
    79937985       
    79947986        # UpdateMCSA executable code starts here
    7995         #G2frame.MCSA.DestroyChildren() # bad, deletes scrollbars on Mac!
    7996         if G2frame.MCSA.GetSizer():
    7997             G2frame.MCSA.GetSizer().Clear(True)
     7987        if G2frame.MCSA.GetSizer(): G2frame.MCSA.GetSizer().Clear(True)
    79987988        if not data['Drawing']:                 #if new drawing - no drawing data!
    79997989            SetupDrawingData()
     
    91719161    G2frame.phaseDisplay.gridList = [] # list of all grids in notebook
    91729162    Pages = []   
    9173     G2frame.phaseDisplay.gridList = []
    91749163    General = wx.ScrolledWindow(G2frame.phaseDisplay)
    91759164    G2frame.phaseDisplay.AddPage(General,'General')
Note: See TracChangeset for help on using the changeset viewer.