Changeset 8d0ec40 in sasview for sansguiframe
- Timestamp:
- Sep 6, 2012 6:37:54 PM (12 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 65261207
- Parents:
- 7034fc0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/data_processor.py
rc2e5898 r8d0ec40 682 682 683 683 # Finally check the highlighted cell if any cells missing 684 self.get_highlighted_row( )684 self.get_highlighted_row(True) 685 685 else: 686 686 msg = "No item selected.\n" … … 689 689 return grid.selected_cells 690 690 691 def get_highlighted_row(self ):691 def get_highlighted_row(self, is_number=True): 692 692 """ 693 693 Add highlight rows … … 700 700 if grid.IsInSelection(row, col): 701 701 cel = (row, col) 702 if row < 1 :702 if row < 1 and not is_number: 703 703 continue 704 if not grid.GetCellValue(row, col): 704 # empty cell 705 if not grid.GetCellValue(row, col).lstrip().rstrip(): 706 if cel in grid.selected_cells: 707 grid.selected_cells.remove(cel) 705 708 continue 709 if is_number: 710 try: 711 float(grid.GetCellValue(row, col)) 712 except: 713 # non numeric cell 714 if cel in grid.selected_cells: 715 grid.selected_cells.remove(cel) 716 continue 706 717 if cel not in grid.selected_cells: 707 718 grid.selected_cells.append(cel) … … 970 981 grid = self.notebook.GetPage(pos) 971 982 title = self.notebook.GetPageText(pos) 972 self.notebook.get_highlighted_row( )983 self.notebook.get_highlighted_row(False) 973 984 if len(grid.selected_cells) == 0: 974 985 msg = "Highlight a Data or Chi2 column first..." … … 1280 1291 try: 1281 1292 cell_list = self.notebook.on_edit_axis() 1293 label, title = self.create_axis_label(cell_list) 1282 1294 except: 1283 1295 msg = str(sys.exc_value) … … 1285 1297 StatusEvent(status=msg, info="error")) 1286 1298 return 1287 label, title = self.create_axis_label(cell_list)1288 1299 tcrtl = event.GetEventObject() 1289 1300 if tcrtl == self.x_axis_add:
Note: See TracChangeset
for help on using the changeset viewer.