Changeset 3619


Ignore:
Timestamp:
Sep 25, 2018 11:07:53 AM (5 years ago)
Author:
vondreele
Message:

clear magData when a selection is made
add row select --> mag space group display in magCells table
fix R -3 m spin selection problem

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIdataGUI.py

    r3600 r3619  
    38653865            'GSAS-II project file (*.gpx)|*.gpx',wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)
    38663866        try:
    3867             if dlg.ShowModal() == wx.ID_OK:
     3867            if dlg.ShowModal() == wx.ID_OK:     #TODO: what about Cancel?
    38683868                self.GSASprojectfile = dlg.GetPath()
    38693869                self.GSASprojectfile = G2IO.FileDlgFixExt(dlg,self.GSASprojectfile)
  • trunk/GSASIIphsGUI.py

    r3617 r3619  
    24642464        PatternId = G2gd.GetGPXtreeItemId(G2frame,G2frame.root,PatternName)
    24652465        UnitCellsId = G2gd.GetGPXtreeItemId(G2frame,PatternId, 'Unit Cells List')
    2466         magData = G2frame.GPXtree.GetItemPyData(UnitCellsId)[5]
     2466        UCdata = G2frame.GPXtree.GetItemPyData(UnitCellsId)
     2467        magData = UCdata[5]
    24672468        magKeep = []
    24682469        magIds = []
     
    25402541        G2cnstG.TransConstraints(G2frame,data,newPhase,magchoice['Trans'],vvec,atCodes)     #data is old phase
    25412542        G2frame.newGPXfile = phaseName+'.gpx'
     2543        UCdata[5] = []      #clear away other mag choices from chem phase in new project
     2544        G2frame.GPXtree.SetItemPyData(UnitCellsId,UCdata)
    25422545        G2frame.OnFileSaveas(event)
    25432546        G2frame.GPXtree.SelectItem(sub)
  • trunk/GSASIIpwdGUI.py

    r3618 r3619  
    34103410            G2frame.GPXtree.SetItemPyData(UnitCellsId,data)
    34113411            wx.CallAfter(UpdateUnitCellsGrid,G2frame,data)
     3412        elif c < 0:
     3413            r = event.GetRow()
     3414            phase = magcells[r]
     3415            SGData = phase['SGData']
     3416            msg = 'Magnetic space group information for '+phase['Name']
     3417            text,table = G2spc.SGPrint(SGData,AddInv=True)
     3418            text[0] = ' Magnetic Space Group: '+SGData['MagSpGrp']
     3419            text[3] = ' The magnetic lattice point group is '+SGData['MagPtGp']
     3420            OprNames,SpnFlp = G2spc.GenMagOps(SGData)
     3421            G2G.SGMagSpinBox(G2frame.dataWindow,msg,text,table,SGData['SGCen'],OprNames,
     3422                SGData['SpnFlp'],False).Show()
    34123423       
    34133424    def MakeNewPhase(event):
     
    39033914            table.append(row)
    39043915        MagCellsTable = G2G.Table(table,rowLabels=rowLabels,colLabels=colLabels,types=Types)
    3905         G2frame.GetStatusBar().SetStatusText('Double click Keep to refresh Keep flags',1)
     3916        G2frame.GetStatusBar().SetStatusText('Double click Keep to refresh Keep flags, row no. to see sym. ops.',1)
    39063917        magDisplay = G2G.GSGrid(G2frame.dataWindow)
    39073918        magDisplay.SetTable(MagCellsTable, True)
  • trunk/GSASIIspc.py

    r3617 r3619  
    12331233        else:
    12341234            Spn.append(1)
    1235     elif len(Flds) == 3:    # 3m & m3; one generator
    1236         if "'" in mSgSym:   #could be 1 or 2 '; doesn't matter.
    1237             Spn.append(-1)
     1235    elif len(Flds) == 3:    # 3m & m3; 1 or 2 generator
     1236        if SGData['SGPtGrp'] == '-3m':
     1237            if not mSgSym.count("'"):
     1238                Spn += [1,1,]
     1239            elif mSgSym.count("'") == 2:
     1240                Spn += [-1,1,]
     1241            elif "3'" in mSgSym:
     1242                Spn += [1,-1,]
     1243            else:
     1244                Spn += [-1,-1,]
    12381245        else:
    1239             Spn.append(1)
     1246            if "'" in mSgSym:   #could be 1 or 2 '; doesn't matter.
     1247                Spn.append(-1)
     1248            else:
     1249                Spn.append(1)
    12401250    else:                   #the rest; 3 generators. NB:  any ' before / in 1st field ignored
    12411251        for fld in Flds[1:]:
Note: See TracChangeset for help on using the changeset viewer.