Changeset 4019 for trunk/GSASIIrestrGUI.py
- Timestamp:
- Jun 7, 2019 7:48:58 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIrestrGUI.py
r3856 r4019 52 52 or individual cells can be selected. The column for selected cells is ignored. 53 53 ''' 54 rows = widget.GetSelectedRows() 54 try: 55 rows = widget.GetSelectedRows() 56 except: 57 return 55 58 if not rows: 56 59 top = widget.GetSelectionBlockTopLeft() … … 944 947 def OnDeleteRestraint(event): 945 948 rows = GetSelectedRows(Bonds) 949 G2frame.GetStatusBar().SetStatusText('',1) 946 950 if not rows: 951 G2frame.GetStatusBar().SetStatusText('First select restraints to be deleted',1) 947 952 return 948 953 Bonds.ClearSelection() … … 1074 1079 def OnDeleteRestraint(event): 1075 1080 rows = GetSelectedRows(Angles) 1081 G2frame.GetStatusBar().SetStatusText('',1) 1076 1082 if not rows: 1083 G2frame.GetStatusBar().SetStatusText('First select restraints to be deleted',1) 1077 1084 return 1078 1085 rows.sort() … … 1194 1201 def OnDeleteRestraint(event): 1195 1202 rows = GetSelectedRows(Planes) 1203 G2frame.GetStatusBar().SetStatusText('',1) 1196 1204 if not rows: 1205 G2frame.GetStatusBar().SetStatusText('First select restraints to be deleted',1) 1197 1206 return 1198 1207 rows.sort() … … 1301 1310 def OnDeleteRestraint(event): 1302 1311 rows = GetSelectedRows(Volumes) 1312 G2frame.GetStatusBar().SetStatusText('',1) 1303 1313 if not rows: 1314 G2frame.GetStatusBar().SetStatusText('First select restraints to be deleted',1) 1304 1315 return 1305 1316 rows.sort() … … 1429 1440 def OnDeleteRestraint(event): 1430 1441 rows = GetSelectedRows(TorsionRestr.Torsions) 1442 G2frame.GetStatusBar().SetStatusText('',1) 1431 1443 if not rows: 1432 1444 return 1445 G2frame.GetStatusBar().SetStatusText('First select restraints to be deleted',1) 1433 1446 rows.sort() 1434 1447 rows.reverse() … … 1553 1566 def OnDeleteRestraint(event): 1554 1567 rows = GetSelectedRows(RamaRestr.Ramas) 1568 G2frame.GetStatusBar().SetStatusText('',1) 1555 1569 if not rows: 1570 G2frame.GetStatusBar().SetStatusText('First select restraints to be deleted',1) 1556 1571 return 1557 1572 rows.sort() … … 1685 1700 #rows = GetSelectedRows() 1686 1701 rows = ChemComps.GetSelectedRows() 1702 G2frame.GetStatusBar().SetStatusText('',1) 1687 1703 if not rows: 1704 G2frame.GetStatusBar().SetStatusText('First select restraints to be deleted',1) 1688 1705 return 1689 1706 rowLabl = ChemComps.GetRowLabelValue(r) … … 1794 1811 def OnDeleteRestraint(event): 1795 1812 rows = GetSelectedRows(Textures) 1813 G2frame.GetStatusBar().SetStatusText('',1) 1796 1814 if not rows: 1815 G2frame.GetStatusBar().SetStatusText('First select restraints to be deleted',1) 1797 1816 return 1798 1817 rows.sort() … … 1878 1897 '''Delete a restraint expression''' 1879 1898 n = event.GetEventObject().index 1880 del generalRestData['General'][n] 1899 G2frame.GetStatusBar().SetStatusText('',1) 1900 if not n: 1901 G2frame.GetStatusBar().SetStatusText('First select restraints to be deleted',1) 1902 return 1881 1903 wx.CallAfter(UpdateGeneralRestr,restrData['General']) 1882 1904
Note: See TracChangeset
for help on using the changeset viewer.