Figured it out -- after adding a row to my underlying model, I attempted to set the current index on my tableview to the index of the model, but *instead* I needed to set it to the index of the proxy model.
This is what I had been doing
flowpathmodel->insertRow(row);
fp_index = flowpathmodel->index (row, 0);
ui->FlowpathTV->setCurrentIndex (fp_index);
flowpathmodel->insertRow(row);
fp_index = flowpathmodel->index (row, 0);
ui->FlowpathTV->setCurrentIndex (fp_index);
To copy to clipboard, switch view to plain text mode
When I should be doing this
flowpathmodel->insertRow(row);
proxyindex = flowpathproxy->index (row, 0);
ui->FlowpathTV->setCurrentIndex (proxyindex);
flowpathmodel->insertRow(row);
proxyindex = flowpathproxy->index (row, 0);
ui->FlowpathTV->setCurrentIndex (proxyindex);
To copy to clipboard, switch view to plain text mode
When I'd inserted a new row I had expected the selection to remain with my new row, and it did with the model but not the proxy model, and now you can see why...I need to not mix and match using the underlying model with the proxy model -- one or the other, but that's the next step
scott
Bookmarks