Project

General

Profile

Actions

Bug #2525

closed
AF KD

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

Bug #2525: WTableView doesn't scroll to the last row if it was just added

Added by Alan Finley over 12 years ago. Updated over 12 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.

KD Updated by Koen Deforche over 12 years ago Actions #1

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

KD Updated by Koen Deforche over 12 years ago Actions #2

  • Status changed from InProgress to Resolved

Hey,

Thanks! The scrolling was indeed happening before the geometry modifications, and same for WTreeView.

Regards,
koen

KD Updated by Koen Deforche over 12 years ago Actions #3

  • Status changed from Resolved to Closed
Actions

Also available in: PDF Atom