Ignore:
Timestamp:
Jul 5, 2017 7:13:15 PM (4 years ago)
Author:
toby
Message:

more Bind()'s to dataWindow; better error msg on bindist problem

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branch/2frame/GSASIIrestrGUI.py

    r2909 r2912  
    919919                Bonds.Bind(wg.EVT_GRID_LABEL_LEFT_CLICK,OnRowSelect)
    920920                Bonds.Bind(wg.EVT_GRID_CELL_CHANGE, OnCellChange)
    921                 G2frame.dataWindow.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE)
    922                 G2frame.dataWindow.Bind(wx.EVT_MENU, OnChangeValue, id=G2gd.wxID_RESRCHANGEVAL)
    923                 G2frame.dataWindow.Bind(wx.EVT_MENU, OnChangeEsd, id=G2gd.wxID_RESTCHANGEESD)
     921                G2frame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE)
     922                G2frame.Bind(wx.EVT_MENU, OnChangeValue, id=G2gd.wxID_RESRCHANGEVAL)
     923                G2frame.Bind(wx.EVT_MENU, OnChangeEsd, id=G2gd.wxID_RESTCHANGEESD)
    924924                mainSizer.Add(wx.StaticText(BondRestr,-1,
    925925                    'Bond restraints: sum(wt*(delt/sig)^2) =    %.2f, mean(wt*(delt/sig)^2) =    %.2f'    \
     
    10551055                Angles.Bind(wg.EVT_GRID_LABEL_LEFT_CLICK,OnRowSelect)
    10561056                Angles.Bind(wg.EVT_GRID_CELL_CHANGE, OnCellChange)
    1057                 G2frame.dataWindow.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE)
    1058                 G2frame.dataWindow.Bind(wx.EVT_MENU, OnChangeValue, id=G2gd.wxID_RESRCHANGEVAL)
    1059                 G2frame.dataWindow.Bind(wx.EVT_MENU, OnChangeEsd, id=G2gd.wxID_RESTCHANGEESD)
     1057                G2frame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE)
     1058                G2frame.Bind(wx.EVT_MENU, OnChangeValue, id=G2gd.wxID_RESRCHANGEVAL)
     1059                G2frame.Bind(wx.EVT_MENU, OnChangeEsd, id=G2gd.wxID_RESTCHANGEESD)
    10601060                mainSizer.Add(wx.StaticText(AngleRestr,-1,
    10611061                    'Angle restraints: sum(wt*(delt/sig)^2) =    %.2f, mean(wt*(delt/sig)^2) =    %.2f'    \
     
    11831183                Planes.Bind(wg.EVT_GRID_LABEL_LEFT_CLICK,OnRowSelect)
    11841184                Planes.Bind(wg.EVT_GRID_CELL_CHANGE, OnCellChange)
    1185                 G2frame.dataWindow.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE)
    1186                 G2frame.dataWindow.Bind(wx.EVT_MENU, OnChangeEsd, id=G2gd.wxID_RESTCHANGEESD)
     1185                G2frame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE)
     1186                G2frame.Bind(wx.EVT_MENU, OnChangeEsd, id=G2gd.wxID_RESTCHANGEESD)
    11871187                mainSizer.Add(wx.StaticText(PlaneRestr,-1,
    11881188                    'Plane restraints: sum(wt*(delt/sig)^2) =    %.2f, mean(wt*(delt/sig)^2) =    %.2f'    \
     
    13131313                Volumes.Bind(wg.EVT_GRID_LABEL_LEFT_CLICK,OnRowSelect)
    13141314                Volumes.Bind(wg.EVT_GRID_CELL_CHANGE, OnCellChange)
    1315                 G2frame.dataWindow.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE)
    1316                 G2frame.dataWindow.Bind(wx.EVT_MENU, OnChangeValue, id=G2gd.wxID_RESRCHANGEVAL)
    1317                 G2frame.dataWindow.Bind(wx.EVT_MENU, OnChangeEsd, id=G2gd.wxID_RESTCHANGEESD)
     1315                G2frame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE)
     1316                G2frame.Bind(wx.EVT_MENU, OnChangeValue, id=G2gd.wxID_RESRCHANGEVAL)
     1317                G2frame.Bind(wx.EVT_MENU, OnChangeEsd, id=G2gd.wxID_RESTCHANGEESD)
    13181318                mainSizer.Add(wx.StaticText(ChiralRestr,-1,
    13191319                    'Chiral volume restraints: sum(wt*(delt/sig)^2) =    %.2f, mean(wt*(delt/sig)^2) =    %.2f'    \
     
    14161416                TorsionRestr.Torsions.Bind(wg.EVT_GRID_LABEL_LEFT_CLICK,OnRowSelect)
    14171417                TorsionRestr.Torsions.Bind(wg.EVT_GRID_CELL_CHANGE, OnCellChange)
    1418                 G2frame.dataWindow.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE)
    1419                 G2frame.dataWindow.Bind(wx.EVT_MENU, OnChangeEsd, id=G2gd.wxID_RESTCHANGEESD)
     1418                G2frame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE)
     1419                G2frame.Bind(wx.EVT_MENU, OnChangeEsd, id=G2gd.wxID_RESTCHANGEESD)
    14201420                mainSizer.Add(wx.StaticText(TorsionRestr,-1,
    14211421                    'Torsion restraints: sum(wt*(delt/sig)^2) =    %.2f, mean(wt*(delt/sig)^2) =    %.2f'    \
     
    15381538                RamaRestr.Ramas.Bind(wg.EVT_GRID_LABEL_LEFT_CLICK,OnRowSelect)
    15391539                RamaRestr.Ramas.Bind(wg.EVT_GRID_CELL_CHANGE, OnCellChange)
    1540                 G2frame.dataWindow.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE)
    1541                 G2frame.dataWindow.Bind(wx.EVT_MENU, OnChangeEsd, id=G2gd.wxID_RESTCHANGEESD)
     1540                G2frame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE)
     1541                G2frame.Bind(wx.EVT_MENU, OnChangeEsd, id=G2gd.wxID_RESTCHANGEESD)
    15421542                mainSizer.Add(wx.StaticText(RamaRestr,-1,
    15431543                    'Ramachandran restraints: sum(wt*(delt/sig)^2) =    %.2f, mean(wt*(delt/sig)^2) =    %.2f'    \
     
    16911691                ChemComps.Bind(wg.EVT_GRID_LABEL_LEFT_CLICK,OnRowSelect)
    16921692                ChemComps.Bind(wg.EVT_GRID_CELL_CHANGE, OnCellChange)
    1693                 G2frame.dataWindow.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE)
    1694                 G2frame.dataWindow.Bind(wx.EVT_MENU, OnChangeValue, id=G2gd.wxID_RESRCHANGEVAL)
     1693                G2frame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE)
     1694                G2frame.Bind(wx.EVT_MENU, OnChangeValue, id=G2gd.wxID_RESRCHANGEVAL)
    16951695                mainSizer.Add(wx.StaticText(ChemCompRestr,-1,
    16961696                    'Chemical composition restraints: sum(wt*(delt/sig)^2) =    %.2f, mean(wt*(delt/sig)^2) =    %.2f'    \
     
    17711771            Textures.Bind(wg.EVT_GRID_LABEL_LEFT_CLICK,OnRowSelect)
    17721772            Textures.Bind(wg.EVT_GRID_CELL_CHANGE, OnCellChange)
    1773             G2frame.dataWindow.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE)
     1773            G2frame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE)
    17741774            mainSizer.Add(Textures,0,)
    17751775        else:
     
    18661866    if len(Phases) > 1:
    18671867        G2frame.dataWindow.RestraintEdit.Enable(G2gd.wxID_RESTSELPHASE,True)
    1868         G2frame.dataWindow.Bind(wx.EVT_MENU, OnSelectPhase, id=G2gd.wxID_RESTSELPHASE)
    1869     G2frame.dataWindow.Bind(wx.EVT_MENU, OnAddRestraint, id=G2gd.wxID_RESTRAINTADD)
     1868        G2frame.Bind(wx.EVT_MENU, OnSelectPhase, id=G2gd.wxID_RESTSELPHASE)
     1869    G2frame.Bind(wx.EVT_MENU, OnAddRestraint, id=G2gd.wxID_RESTRAINTADD)
    18701870    if 'macro' in phasedata['General']['Type']:
    18711871        G2frame.dataWindow.RestraintEdit.Enable(G2gd.wxID_AARESTRAINTADD,True)
    1872         G2frame.dataWindow.Bind(wx.EVT_MENU, OnAddAARestraint, id=G2gd.wxID_AARESTRAINTADD)
    1873         G2frame.dataWindow.Bind(wx.EVT_MENU, OnPlotAARestraint, id=G2gd.wxID_AARESTRAINTPLOT)
     1872        G2frame.Bind(wx.EVT_MENU, OnAddAARestraint, id=G2gd.wxID_AARESTRAINTADD)
     1873        G2frame.Bind(wx.EVT_MENU, OnPlotAARestraint, id=G2gd.wxID_AARESTRAINTPLOT)
    18741874   
    18751875    # clear menu and menu pointers
Note: See TracChangeset for help on using the changeset viewer.