Changeset 1099
- Timestamp:
- Oct 10, 2013 1:03:26 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIplot.py
r1098 r1099 1859 1859 msg = 'atoms:'+names[ind] 1860 1860 Page.canvas.SetToolTipString(msg) 1861 1861 try: 1862 page = G2frame.dataDisplay.GetSelection() 1863 except: 1864 return 1865 if G2frame.dataDisplay.GetPageText(page) == 'Torsion restraints': 1866 torGrid = G2frame.dataDisplay.GetPage(page).Torsions 1867 torGrid.ClearSelection() 1868 for row in range(torGrid.GetNumberRows()): 1869 if names[ind] in torGrid.GetCellValue(row,0): 1870 torGrid.SelectRow(row) 1871 torGrid.ForceRefresh() 1872 1862 1873 def OnMotion(event): 1863 1874 if event.xdata and event.ydata: #avoid out of frame errors … … 1931 1942 msg = 'atoms:'+names[ind] 1932 1943 Page.canvas.SetToolTipString(msg) 1944 try: 1945 page = G2frame.dataDisplay.GetSelection() 1946 except: 1947 return 1948 if G2frame.dataDisplay.GetPageText(page) == 'Ramachandran restraints': 1949 ramaGrid = G2frame.dataDisplay.GetPage(page).Ramas 1950 ramaGrid.ClearSelection() 1951 for row in range(ramaGrid.GetNumberRows()): 1952 if names[ind] in ramaGrid.GetCellValue(row,0): 1953 ramaGrid.SelectRow(row) 1954 ramaGrid.ForceRefresh() 1933 1955 1934 1956 def OnMotion(event): -
trunk/GSASIIrestrGUI.py
r1097 r1099 1397 1397 del torsionList[ibad] 1398 1398 torsionTable = G2gd.Table(table,rowLabels=rowLabels,colLabels=colLabels,types=Types) 1399 Torsion s = G2gd.GSGrid(TorsionRestr)1400 Torsion s.SetTable(torsionTable, True)1401 Torsion s.AutoSizeColumns(False)1399 TorsionRestr.Torsions = G2gd.GSGrid(TorsionRestr) 1400 TorsionRestr.Torsions.SetTable(torsionTable, True) 1401 TorsionRestr.Torsions.AutoSizeColumns(False) 1402 1402 for r in range(len(torsionList)): 1403 1403 for c in range(5): 1404 Torsion s.SetReadOnly(r,c,True)1405 Torsion s.SetCellStyle(r,c,VERY_LIGHT_GREY,True)1406 Torsion s.Bind(wg.EVT_GRID_LABEL_LEFT_CLICK,OnRowSelect)1407 Torsion s.Bind(wg.EVT_GRID_CELL_CHANGE, OnCellChange)1404 TorsionRestr.Torsions.SetReadOnly(r,c,True) 1405 TorsionRestr.Torsions.SetCellStyle(r,c,VERY_LIGHT_GREY,True) 1406 TorsionRestr.Torsions.Bind(wg.EVT_GRID_LABEL_LEFT_CLICK,OnRowSelect) 1407 TorsionRestr.Torsions.Bind(wg.EVT_GRID_CELL_CHANGE, OnCellChange) 1408 1408 G2frame.dataFrame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE) 1409 1409 G2frame.dataFrame.Bind(wx.EVT_MENU, OnChangeEsd, id=G2gd.wxID_RESTCHANGEESD) … … 1411 1411 'Torsion restraints: sum(wt*(delt/sig)^2) = %.2f, mean(wt*(delt/sig)^2) = %.2f' \ 1412 1412 %(chisq,chisq/len(torsionList))),0,wx.ALIGN_CENTER_VERTICAL) 1413 mainSizer.Add(Torsion s,0,)1413 mainSizer.Add(TorsionRestr.Torsions,0,) 1414 1414 1415 1415 mainSizer.Add((5,5)) … … 1517 1517 del ramaList[ibad] 1518 1518 ramaTable = G2gd.Table(table,rowLabels=rowLabels,colLabels=colLabels,types=Types) 1519 Rama s = G2gd.GSGrid(RamaRestr)1520 Rama s.SetTable(ramaTable, True)1521 Rama s.AutoSizeColumns(False)1519 RamaRestr.Ramas = G2gd.GSGrid(RamaRestr) 1520 RamaRestr.Ramas.SetTable(ramaTable, True) 1521 RamaRestr.Ramas.AutoSizeColumns(False) 1522 1522 for r in range(len(ramaList)): 1523 1523 for c in range(6): 1524 Rama s.SetReadOnly(r,c,True)1525 Rama s.SetCellStyle(r,c,VERY_LIGHT_GREY,True)1526 Rama s.Bind(wg.EVT_GRID_LABEL_LEFT_CLICK,OnRowSelect)1527 Rama s.Bind(wg.EVT_GRID_CELL_CHANGE, OnCellChange)1524 RamaRestr.Ramas.SetReadOnly(r,c,True) 1525 RamaRestr.Ramas.SetCellStyle(r,c,VERY_LIGHT_GREY,True) 1526 RamaRestr.Ramas.Bind(wg.EVT_GRID_LABEL_LEFT_CLICK,OnRowSelect) 1527 RamaRestr.Ramas.Bind(wg.EVT_GRID_CELL_CHANGE, OnCellChange) 1528 1528 G2frame.dataFrame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE) 1529 1529 G2frame.dataFrame.Bind(wx.EVT_MENU, OnChangeEsd, id=G2gd.wxID_RESTCHANGEESD) … … 1531 1531 'Ramachandran restraints: sum(wt*(delt/sig)^2) = %.2f, mean(wt*(delt/sig)^2) = %.2f' \ 1532 1532 %(chisq,chisq/len(ramaList))),0,wx.ALIGN_CENTER_VERTICAL) 1533 mainSizer.Add(Rama s,0,)1533 mainSizer.Add(RamaRestr.Ramas,0,) 1534 1534 else: 1535 1535 mainSizer.Add(wx.StaticText(RamaRestr,-1,'No Ramachandran restraints for this phase'),0,)
Note: See TracChangeset
for help on using the changeset viewer.