90 for current, new, delmsg, addmsg in [ |
90 for current, new, delmsg, addmsg in [ |
91 (self._rows, self.GetNumberRows(), wx.grid.GRIDTABLE_NOTIFY_ROWS_DELETED, wx.grid.GRIDTABLE_NOTIFY_ROWS_APPENDED), |
91 (self._rows, self.GetNumberRows(), wx.grid.GRIDTABLE_NOTIFY_ROWS_DELETED, wx.grid.GRIDTABLE_NOTIFY_ROWS_APPENDED), |
92 (self._cols, self.GetNumberCols(), wx.grid.GRIDTABLE_NOTIFY_COLS_DELETED, wx.grid.GRIDTABLE_NOTIFY_COLS_APPENDED), |
92 (self._cols, self.GetNumberCols(), wx.grid.GRIDTABLE_NOTIFY_COLS_DELETED, wx.grid.GRIDTABLE_NOTIFY_COLS_APPENDED), |
93 ]: |
93 ]: |
94 if new < current: |
94 if new < current: |
95 msg = wx.grid.GridTableMessage(self,delmsg,new,current-new) |
95 msg = wx.grid.GridTableMessage(self, delmsg, new, current-new) |
96 grid.ProcessTableMessage(msg) |
96 grid.ProcessTableMessage(msg) |
97 elif new > current: |
97 elif new > current: |
98 msg = wx.grid.GridTableMessage(self,addmsg,new-current) |
98 msg = wx.grid.GridTableMessage(self, addmsg, new-current) |
99 grid.ProcessTableMessage(msg) |
99 grid.ProcessTableMessage(msg) |
100 self.UpdateValues(grid) |
100 self.UpdateValues(grid) |
101 grid.EndBatch() |
101 grid.EndBatch() |
102 |
102 |
103 self._rows = self.GetNumberRows() |
103 self._rows = self.GetNumberRows() |