(self, grid)
| 48 | self.tps.data[col][row] = value |
| 49 | |
| 50 | def ResetView(self, grid): |
| 51 | grid.BeginBatch() |
| 52 | |
| 53 | for current, new, delmsg, addmsg in [ |
| 54 | (self._rows, self.GetNumberRows(), Grid.GRIDTABLE_NOTIFY_ROWS_DELETED, Grid.GRIDTABLE_NOTIFY_ROWS_APPENDED), |
| 55 | (self._cols, self.GetNumberCols(), Grid.GRIDTABLE_NOTIFY_COLS_DELETED, Grid.GRIDTABLE_NOTIFY_COLS_APPENDED), |
| 56 | ]: |
| 57 | |
| 58 | if new < current: |
| 59 | msg = Grid.GridTableMessage(self,delmsg,new,current-new) |
| 60 | grid.ProcessTableMessage(msg) |
| 61 | elif new > current: |
| 62 | msg = Grid.GridTableMessage(self,addmsg,new-current) |
| 63 | grid.ProcessTableMessage(msg) |
| 64 | self.UpdateValues(grid) |
| 65 | |
| 66 | grid.EndBatch() |
| 67 | |
| 68 | self._rows = self.GetNumberRows() |
| 69 | self._cols = self.GetNumberCols() |
| 70 | # update the column rendering plugins |
| 71 | self._updateColAttrs(grid) |
| 72 | |
| 73 | # update the scrollbars and the displayed part of the grid |
| 74 | grid.AdjustScrollbars() |
| 75 | grid.ForceRefresh() |
| 76 | |
| 77 | |
| 78 | def UpdateValues(self, grid): |
no test coverage detected