Skip to content
Snippets Groups Projects
Commit 4f94145f authored by hjk's avatar hjk
Browse files

debugger: force a call to canFetchMore() if an WatchItem gains children

parent 913f6161
No related branches found
No related tags found
No related merge requests found
...@@ -927,6 +927,13 @@ void WatchModel::insertData(const WatchData &data) ...@@ -927,6 +927,13 @@ void WatchModel::insertData(const WatchData &data)
oldItem->generation = generationCounter; oldItem->generation = generationCounter;
QModelIndex idx = watchIndex(oldItem); QModelIndex idx = watchIndex(oldItem);
emit dataChanged(idx, idx.sibling(idx.row(), 2)); emit dataChanged(idx, idx.sibling(idx.row(), 2));
// HACK: Make the view call canFetchMore(). This is needed in
// case we were stepping from a state where the item had no
// children to a state where it has one, like inserting the
// first item into a container.
QModelIndex dummy = index.child(0, 0);
beginInsertRows(dummy, 0, 0);
endInsertRows();
} else { } else {
// add new entry // add new entry
//MODEL_DEBUG("ADD : " << data.iname << data.value); //MODEL_DEBUG("ADD : " << data.iname << data.value);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment