Changeset 4805 for trunk/GSASIIconstrGUI.py
- Timestamp:
- Feb 8, 2021 2:37:16 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIconstrGUI.py
r4782 r4805 1759 1759 '''Called when Rigid bodies tree item is selected. 1760 1760 Displays the rigid bodies in the data window 1761 ''' 1762 if not data.get('RBIds') or not data: 1763 data.update({'Vector':{'AtInfo':{}},'Residue':{'AtInfo':{}}, 1764 'RBIds':{'Vector':[],'Residue':[]}}) #empty/bad dict - fill it 1765 1766 global resList,resRBsel 1767 Indx = {} 1768 resList = [] 1769 plotDefaults = {'oldxy':[0.,0.],'Quaternion':[0.,0.,0.,1.],'cameraPos':30.,'viewDir':[0,0,1],} 1770 1771 G2frame.rbBook = G2G.GSNoteBook(parent=G2frame.dataWindow) 1772 G2frame.dataWindow.GetSizer().Add(G2frame.rbBook,1,wx.ALL|wx.EXPAND) 1773 VectorRB = wx.ScrolledWindow(G2frame.rbBook) 1774 VectorRBDisplay = wx.Panel(VectorRB) 1775 G2frame.rbBook.AddPage(VectorRB,'Vector rigid bodies') 1776 ResidueRB = wx.ScrolledWindow(G2frame.rbBook) 1777 ResidueRBDisplay = wx.Panel(ResidueRB) 1778 G2frame.rbBook.AddPage(ResidueRB,'Residue rigid bodies') 1779 1761 ''' 1780 1762 def OnPageChanged(event): 1781 1763 global resList … … 3645 3627 G2frame.GetStatusBar().SetStatusText(text,1) 3646 3628 3629 #================== UpdateRigidBodies starts here ========= 3630 global resList,resRBsel 3631 if not data.get('RBIds') or not data: 3632 data.update({'Vector':{'AtInfo':{}},'Residue':{'AtInfo':{}}, 3633 'RBIds':{'Vector':[],'Residue':[]}}) #empty/bad dict - fill it 3634 Indx = {} 3635 resList = [] 3636 plotDefaults = {'oldxy':[0.,0.],'Quaternion':[0.,0.,0.,1.],'cameraPos':30.,'viewDir':[0,0,1],} 3637 G2frame.rbBook = G2G.GSNoteBook(parent=G2frame.dataWindow) 3638 G2frame.dataWindow.GetSizer().Add(G2frame.rbBook,1,wx.ALL|wx.EXPAND) 3639 VectorRB = wx.ScrolledWindow(G2frame.rbBook) 3640 VectorRBDisplay = wx.Panel(VectorRB) 3641 G2frame.rbBook.AddPage(VectorRB,'Vector rigid bodies') 3642 ResidueRB = wx.ScrolledWindow(G2frame.rbBook) 3643 ResidueRBDisplay = wx.Panel(ResidueRB) 3644 G2frame.rbBook.AddPage(ResidueRB,'Residue rigid bodies') 3645 # vector RBs are not too common, so select Residue as the default when one is present 3646 if len(data['RBIds']['Residue']) > 0 and len(data['RBIds']['Vector']) == 0: 3647 G2frame.rbBook.ChangeSelection(1) 3648 OnPageChanged(None) 3647 3649 G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.RigidBodyMenu) 3648 3650 SetStatusLine('')
Note: See TracChangeset
for help on using the changeset viewer.