Changeset 63dc6e5 in sasview
- Timestamp:
- Oct 3, 2011 7:22:33 AM (13 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:
- 342dc442
- Parents:
- 7bd6cfae
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/data_processor.py
r5425990 r63dc6e5 101 101 self._cols = 50 102 102 self._rows = 51 103 self.last_selected_row = -1 104 self.last_selected_col = -1 103 105 col_with = 30 104 106 row_height = 20 … … 108 110 self.selected_cells = [] 109 111 self.selected_cols = [] 112 self.selected_row = [] 113 self.plottable_list = [] 114 self.plottable_flag = False 110 115 self.SetColMinimalAcceptableWidth(col_with) 111 116 self.SetRowMinimalAcceptableHeight(row_height) … … 133 138 row, col = event.GetRow(), event.GetCol() 134 139 cell = (row, col) 140 event.Skip() 135 141 if not flag: 136 142 self.selected_cells = [] 137 143 self.axis_value = [] 138 144 self.axis_label = "" 145 if col >= 0: 146 self.axis_label = self.GetCellValue(0, col) 139 147 if cell not in self.selected_cells: 140 148 if row > 0: … … 147 155 if cell_row > 0 and cell_row < self.max_row_touse: 148 156 self.axis_value.append(self.GetCellValue(cell_row, cell_col)) 149 self.axis_label = self.GetCellValue(0, col) 150 event.Skip() 151 157 158 def set_plottable_list(self, prev_row, next_row, prev_col, next_col): 159 """ 160 """ 161 if (prev_col == -1 and next_col != -1 and prev_row != -1 ) or \ 162 (prev_row == -1 and next_row !=-1 and prev_col != -1): 163 self.plottable_flag = True 164 if self.plottable_flag: 165 print "special case" 166 152 167 def on_left_click(self, event): 153 168 """ … … 157 172 flag = event.CmdDown() or event.ControlDown() 158 173 col = event.GetCol() 174 row = event.GetRow() 175 print "on left click", row, col, flag 176 159 177 if not flag: 160 178 self.selected_cols = [] 161 179 self.selected_cells = [] 162 180 self.axis_label = "" 181 self.plottable_list = [] 182 self.plottable_flag = False 183 else: 184 self.set_plottable_list(prev_row=self.last_selected_row, 185 next_row=row, 186 prev_col=self.last_selected_col, 187 next_col=col) 188 189 self.last_selected_col = col 190 self.last_selected_row = row 163 191 if col != -1: 164 192 for row in range(1, self.GetNumberRows()+ 1):
Note: See TracChangeset
for help on using the changeset viewer.