From: Nathan K. <nk...@us...> - 2004-03-17 08:59:18
|
CVSROOT: /cvsroot/pilot-db Module name: pilot-db Changes by: nkurz 04/03/17 00:49:55 Modified files: src : listview.c Log message: Fix bug #917146 (and several older bugs): a new record added to a database of size greater than AUTO_RETAIN_SIZE would appear in the list view, but would not go to the edit form when clicked. The problem was a check that the row clicked was <= lastModelIndex. Because RetainGrid is true in this case, the lastModelIndex was off. So I've added calls to increment it when a record is added to a large database. This is somewhat ugly, in part because I'm not quite sure what lastModelIndex actually is. It's possible that removing the conditional would be a better choice, since I can't see when it would be called with a row larger than the number of records. But the base problem is that we need to have fewer possible codepaths, otherwise testing is going to continue to be a nightmare. Small and large databases need to be handled more similarly, and VLDB needs to become the standard codepath (or something needs to replace them both). |