Changeset 3397 for trunk/GSASIIphsGUI.py


Ignore:
Timestamp:
May 23, 2018 10:28:09 AM (5 years ago)
Author:
vondreele
Message:

fix Constraints problem when no histograms (or phases)
display new BNS lattice after change in TransformDialog?
Make magnetic now a Button
fix SyteSym? & mult after space group/BNS change - new UpdateSytSym? routine in G2spc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r3396 r3397  
    470470           
    471471        def OnMag(event):
    472             self.ifMag = mag.GetValue()
     472            self.ifMag = True
     473            self.BNSlatt = SGData['SGLatt']
    473474            wx.CallAfter(self.Draw)
    474475           
     
    478479        def OnBNSlatt(event):
    479480            Obj = event.GetEventObject()
    480             BNSlatt = Obj.GetValue()
    481             if BNSlatt == SGData['SGLatt']:
     481            self.BNSlatt = Obj.GetValue()
     482            if self.BNSlatt == SGData['SGLatt']:
    482483                return
    483             SGData['BNSlattsym'] = [BNSlatt,BNSsym[BNSlatt]]
     484            SGData['BNSlattsym'] = [self.BNSlatt,BNSsym[self.BNSlatt]]
    484485            SGData['SGSpin'] = [1,]*len(SGData['SGSpin'])
    485486            self.Trans = G2spc.ApplyBNSlatt(SGData,SGData['BNSlattsym'])
     
    547548                BNSkeys = [SGData['SGLatt'],]+list(BNSsym.keys())
    548549                BNS = wx.ComboBox(self.panel,value=SGData['SGLatt'],choices=BNSkeys,style=wx.CB_READONLY|wx.CB_DROPDOWN)
     550                BNS.SetValue(self.BNSlatt)
    549551                BNS.Bind(wx.EVT_COMBOBOX,OnBNSlatt)
    550552                BNSizer.Add(BNS,0,WACV)
    551553                mainSizer.Add(BNSizer,0,WACV)
    552554            else:
    553                 mag = wx.CheckBox(self.panel,label=' Make new phase magnetic?')
    554                 mag.Bind(wx.EVT_CHECKBOX,OnMag)
     555                mag = wx.Button(self.panel,label=' Make new phase magnetic?')
     556                mag.Bind(wx.EVT_BUTTON,OnMag)
    555557                mainSizer.Add(mag,0,WACV)
    556558            mainSizer.Add(wx.StaticText(self.panel, \
     
    15141516                    msg = 'Space Group Information'
    15151517                    G2G.SGMessageBox(General,msg,text,table).Show()
    1516                 Atoms = data['Atoms']
    1517                 cx,ct,cs,cia = generalData['AtomPtrs']
    1518                 for atom in Atoms:
    1519                     XYZ = atom[cx:cx+3]
    1520                     Sytsym,Mult = G2spc.SytSym(XYZ,SGData)[:2]
    1521                     atom[cs] = Sytsym
    1522                     atom[cs+1] = Mult
     1518                G2spc.UpdateSytSym(data)
    15231519                NShkl = len(G2spc.MustrainNames(SGData))
    15241520                NDij = len(G2spc.HStrainNames(SGData))
     
    18661862                G2spc.ApplyBNSlatt(SGData,SGData['BNSlattsym'])
    18671863                generalData['SGData'] = SGData
     1864                G2spc.UpdateSytSym(data)
    18681865                wx.CallAfter(UpdateGeneral)
    18691866           
Note: See TracChangeset for help on using the changeset viewer.