Changeset 4599


Ignore:
Timestamp:
Oct 16, 2020 3:39:52 PM (12 months ago)
Author:
toby
Message:

remove RB match box when no atoms can be matched

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r4598 r4599  
    1074510745            btnSizer.Add((20,20),1)
    1074610746            mainSizer.Add(btnSizer,0,wx.BOTTOM|wx.TOP, 20)
    10747                
     10747
    1074810748            SetPhaseWindow(RigidBodies,mainSizer)
     10749            data['testRBObj']['RBhighLight'] = None
     10750            data['testRBObj']['CRYhighLight'] = []
     10751            assignable = [a[0] for a in data['Atoms'] if a[-1] not in rbUsedIds]
     10752            data['testRBObj']['availAtoms'] = ['         '] + assignable
     10753            if len(assignable) == 0:
     10754                misc['UpdateTable'] = None
     10755                G2plt.PlotStructure(G2frame,data,True)
     10756                return
     10757           
    1074910758            G2plt.PlotStructure(G2frame,data,True,UpdateTable)
    1075010759           
     10760            mainSizer.Add(wx.StaticText(RigidBodies,wx.ID_ANY,
     10761                    'Match between atoms in rigid body and crystal.'+
     10762                    ' Use assignments to align bodies.'),0)
     10763            mainSizer.Add((5,5))
    1075110764            gridSizer = wx.BoxSizer(wx.HORIZONTAL)
    1075210765            colLabels = ['RB\ntype','phase\n#','phase\nlabel','delta, A','Assign as atom']
     
    1076910782            RigidBodies.atomsGrid = G2G.GSGrid(RigidBodies)
    1077010783            RigidBodies.atomsGrid.Bind(wg.EVT_GRID_LABEL_LEFT_CLICK,OnRowSelect)
    10771             data['testRBObj']['RBhighLight'] = None
    10772             data['testRBObj']['CRYhighLight'] = []
    10773             data['testRBObj']['availAtoms'] = ['         '] + [a[0] for a in data['Atoms']
    10774                                                  if a[-1] not in rbUsedIds]
    1077510784            choiceeditor = wg.GridCellChoiceEditor(
    1077610785                data['testRBObj']['availAtoms']+['Create new'], False)
     
    1082810837            RigidBodies.Scroll(0,0)
    1082910838            RigidBodies.SetFocus() # make sure tab presses go to panel
    10830             data['testRBObj']['UpdateTable'] = UpdateTable
     10839            misc['UpdateTable'] = UpdateTable
    1083110840        # start of OnRBAssign(event)
    1083210841        rbAssignments = {}
     
    1284512854                    misc['showSelect'].SetLabelText(data['Atoms'][I][0])
    1284612855                    break
    12847         G2plt.PlotStructure(G2frame,data,False,data['testRBObj']['UpdateTable'])
     12856        G2plt.PlotStructure(G2frame,data,False,misc['UpdateTable'])
    1284812857    if data['General']['Type'] not in ['faulted',] and not data['General']['Modulated']:
    1284912858        RigidBodies = wx.ScrolledWindow(G2frame.phaseDisplay)
Note: See TracChangeset for help on using the changeset viewer.