Project

General

Profile

Actions

Bug #2525

closed

WTableView doesn't scroll to the last row if it was just added

Added by Alan Finley about 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
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.

Actions #1

Updated by Koen Deforche about 10 years ago

  • Status changed from New to InProgress
  • Assignee set to Koen Deforche
  • Target version set to 3.3.2
Actions #2

Updated by Koen Deforche about 10 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

Actions #3

Updated by Koen Deforche about 10 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF