Bug #2525
WTableView doesn't scroll to the last row if it was just added
Start date:
12/28/2013
Due date:
% Done:
0%
Estimated time:
Description
This is the example:
void scrollToLast(Wt::WTableView *view) { Wt::WStandardItemModel model = dynamic_cast<Wt::WStandardItemModel*>(view->model()); model->appendRow(new Wt::WStandardItem("new")); Wt::WModelIndex index = model->index(model->rowCount() - 1, 0); view->scrollTo(index); }
In this case WTableView scrolls to the second last row and not to the last one. If I don't add any new rows scrolling works as expected.
I use Wt 3.3.1.
Updated by Koen Deforche over 8 years ago
- Status changed from New to InProgress
- Assignee set to Koen Deforche
- Target version set to 3.3.2
Updated by Koen Deforche over 8 years ago
- Status changed from InProgress to Resolved
Hey,
Thanks! The scrolling was indeed happening before the geometry modifications, and same for WTreeView.
Regards,
koen