Skip to content

Commit b258b2f

Browse files
committed
remove symAxis choice on non spin RBs - can't be changed
fix sash position on main window; min/max mixup
1 parent 6e98f63 commit b258b2f

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

GSASII/GSASIIdataGUI.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3150,7 +3150,7 @@ def _init_ctrls(self, parent):
31503150
self.dataWindow = G2DataWindow(self.mainPanel)
31513151
dataSizer = wx.BoxSizer(wx.VERTICAL)
31523152
self.dataWindow.SetSizer(dataSizer)
3153-
sash = max(min(100,GSASIIpath.GetConfigValue('Split_Loc',250)),500)
3153+
sash = min(max(100,GSASIIpath.GetConfigValue('Split_Loc',250)),500)
31543154
# if GSASIIpath.GetConfigValue('debug'):
31553155
# print('SplitterWindow sash=',sash,GSASIIpath.GetConfigValue('Split_Loc'))
31563156
self.mainPanel.SplitVertically(self.treePanel, self.dataWindow.outer, sash)

GSASII/GSASIIphsGUI.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9955,18 +9955,20 @@ def OnSymRadioSet(event):
99559955
sytsymtxt = wx.StaticText(RigidBodies,label='%s site symmetry: %s, multiplicity: %d '%(Name,Sytsym,Mult))
99569956
rbSizer.Add(topSizer)
99579957
rbSizer.Add(sytsymtxt)
9958-
if rbType != 'Residue':
9959-
choices = [' x ',' y ',' z ','x+y','x+y+z']
9960-
RBObj['symAxis'] = RBObj.get('symAxis',[0,0,1]) #set default as 'z'
9961-
try:
9962-
symax = dict(zip([str(x) for x in [[1,0,0],[0,1,0],[0,0,1],[1,1,0],[1,1,1]]],choices))[str(RBObj['symAxis'])]
9963-
except KeyError:
9964-
symax = ' z '
9958+
choices = [' x ',' y ',' z ','x+y','x+y+z']
9959+
RBObj['symAxis'] = RBObj.get('symAxis',[0,0,1]) #set default as 'z'
9960+
try:
9961+
symax = dict(zip([str(x) for x in [[1,0,0],[0,1,0],[0,0,1],[1,1,0],[1,1,1]]],choices))[str(RBObj['symAxis'])]
9962+
except KeyError:
9963+
symax = ' z '
9964+
if rbType == 'Spin':
99659965
symRadioSet = wx.RadioBox(RigidBodies,choices=choices,label='RB polar axis is aligned along:')
99669966
symRadioSet.SetStringSelection(symax)
99679967
symRadioSet.Bind(wx.EVT_RADIOBOX, OnSymRadioSet)
99689968
Indx[symRadioSet.GetId()] = rbId
99699969
rbSizer.Add(symRadioSet)
9970+
else:
9971+
rbSizer.Add(wx.StaticText(RigidBodies,label='Rigid body symmetry axis is %s'%symax))
99709972
return rbSizer
99719973

99729974
def SpnrbSizer(RBObj,spnIndx):

0 commit comments

Comments
 (0)