Ignore:
Timestamp:
Jul 22, 2017 11:51:59 AM (4 years ago)
Author:
vondreele
Message:

fix rigid body GUI display
remove an extra SetAutoLayout?
fix plotting problem for new MCSA model entry
make sure import phase from gp is clean (no maps, map peaks, rigid bodies, etc.)

File:
1 edited

Legend:

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

    r2917 r2940  
    13101310    resList = []
    13111311    plotDefaults = {'oldxy':[0.,0.],'Quaternion':[0.,0.,0.,1.],'cameraPos':30.,'viewDir':[0,0,1],}
     1312
     1313    G2frame.rbBook = G2G.GSNoteBook(parent=G2frame.dataWindow)
     1314    G2frame.dataWindow.GetSizer().Add(G2frame.rbBook,1,wx.ALL|wx.EXPAND)
     1315    VectorRB = wx.ScrolledWindow(G2frame.rbBook)
     1316    VectorRBDisplay = wx.Panel(VectorRB)
     1317    G2frame.rbBook.AddPage(VectorRB,'Vector rigid bodies')
     1318    ResidueRB = wx.ScrolledWindow(G2frame.rbBook)
     1319    ResidueRBDisplay = wx.Panel(ResidueRB)
     1320    G2frame.rbBook.AddPage(ResidueRB,'Residue rigid bodies')
    13121321   
    13131322    def OnPageChanged(event):
     
    17591768                for col in [4,5,6]:
    17601769                    vecGrid.SetCellStyle(row,col,VERY_LIGHT_GREY,True)
    1761             vecGrid.SetMargins(0,0)
     1770            vecGrid.SetScrollRate(0,0)
    17621771            vecGrid.AutoSizeColumns(False)
    17631772            vecSizer.Add(vecGrid)
     
    17761785           
    17771786        if VectorRB.GetSizer(): VectorRB.GetSizer().Clear(True)
    1778         VectorRBDisplay = wx.Panel(VectorRB)
    17791787        VectorRBSizer = wx.BoxSizer(wx.VERTICAL)
    17801788        for rbId in data['RBIds']['Vector']:
     
    19221930                for col in range(5):
    19231931                    vecGrid.SetCellStyle(row,col,VERY_LIGHT_GREY,True)
    1924             vecGrid.SetMargins(0,0)
     1932            vecGrid.SetScrollRate(0,0)
    19251933            vecGrid.AutoSizeColumns(False)
    19261934            vecSizer = wx.BoxSizer()
     
    20512059                refChoice[rbId][i].sort()     
    20522060           
    2053         if ResidueRB.GetSizer(): ResidueRB.GetSizer().Clear(True)
    2054         ResidueRBDisplay = wx.Panel(ResidueRB)
     2061        ResidueRBDisplay.DestroyChildren()
    20552062        ResidueRBSizer = wx.BoxSizer(wx.VERTICAL)
    20562063        for rbId in data['RBIds']['Residue']:
     
    20852092
    20862093    G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.RigidBodyMenu)
    2087     #G2frame.SetLabel(G2frame.GetLabel().split('||')[0]+' || '+'Rigid bodies')
    20882094    G2frame.SetTitle('Rigid bodies')
    20892095    SetStatusLine('')
    2090     #G2frame.rbBook = G2G.GSNoteBook(parent=G2frame.dataWindow,size=G2frame.dataWindow.GetClientSize())
    2091     G2frame.rbBook = G2G.GSNoteBook(parent=G2frame.dataWindow)
    2092     G2frame.dataWindow.GetSizer().Add(G2frame.rbBook,1,wx.ALL|wx.EXPAND)
    2093 
    2094     VectorRB = wx.ScrolledWindow(G2frame.rbBook)
    2095     G2frame.rbBook.AddPage(VectorRB,'Vector rigid bodies')
    2096     ResidueRB = wx.ScrolledWindow(G2frame.rbBook)
    2097     G2frame.rbBook.AddPage(ResidueRB,'Residue rigid bodies')
    20982096    UpdateVectorRB()
    20992097    G2frame.rbBook.Bind(wx.aui.EVT_AUINOTEBOOK_PAGE_CHANGED, OnPageChanged)
Note: See TracChangeset for help on using the changeset viewer.