Project

General

Profile

Bug #7888

WStringListModel::setItemData works not correct

Added by Andreas Frolov about 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
12/03/2020
Due date:
% Done:

0%

Estimated time:

Description

Here is my example:

`std::vectorWt::WString data = { "1" };

auto model1 = std::make_sharedWt::WStringListModel(data);
auto model2 = std::make_sharedWt::WStringListModel(data);

auto index1 = model1->index(0, 0);
auto index2 = model2->index(0, 0);

model2->setItemData(index2, model1->itemData(index1));

auto text = Wt::asString(model2->data(index2));`

text is empty because the role Wt::ItemDataRole::Edit has no value and it overwrites the role Wt::ItemDataRole::Display.

No data to display

Also available in: Atom PDF