Project

General

Profile

Actions

Bug #1158

closed

WStandardItem::takeChild() does not propagate signals

Added by Michael Leitman about 12 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Pieter Libin
Target version:
Start date:
02/06/2012
Due date:
% Done:

0%

Estimated time:

Description

I use an WStandardItemModel for the data i received from an .csv file.

Then, i create an WSortFilterProxyModel to set as Model for a tree,

an get the data in it (with setSourceModel())

following my sample pseudo code:

WStandardItemModel *fileModel = new WStandardItemModel();
readFromCsv(f, fileModel); // fills the ItemModel
m_fileProxyModel = new Wt::WSortFilterProxyModel(this);
m_fileProxyModel->setSourceModel(fileModel);
m_tree->setModel(m_fileProxyModel);

Dynamically i read the .csv file to check if there are any changes,

if an item is added, i just set it in my ItemModel:

m_fileModel->setItem(idx_row, idx_col, item);

and the tree is updated with the new information, without refreshing or something

If an .cvs entry is removed, i try to delete if from my model using "takeItem()"

WStandardItem *toRemove = m_fileModel->takeItem(idx_row, idx_col);
delete toRemove;

But this doesn't effect the tree (if it is the second col)?

If needed, i can provide my full example code and the .csv file


Files

hello.C (1.9 KB) hello.C Pieter Libin, 02/14/2012 03:59 PM
Actions #1

Updated by Koen Deforche about 12 years ago

  • Status changed from New to InProgress
  • Assignee set to Pieter Libin
  • Target version set to 3.2.1

Pieter,

For this bug, WStandardItem::takeChild() should fire the appropriate signals.

Regards,

koen

Actions #2

Updated by Pieter Libin about 12 years ago

Example code to reproduce the problem.

Actions #3

Updated by Pieter Libin about 12 years ago

  • Status changed from InProgress to Resolved
Actions #4

Updated by Koen Deforche about 12 years ago

  • Status changed from Resolved to Closed

Fixed in 3.2.1

Actions

Also available in: Atom PDF