mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-26 01:31:30 -05:00
centralized forceRedraw() in boards
This commit is contained in:
parent
a129f6e6f9
commit
40acef3f70
@ -541,25 +541,7 @@ void PostedListWidgetWithModel::postPostLoad()
|
|||||||
void PostedListWidgetWithModel::forceRedraw()
|
void PostedListWidgetWithModel::forceRedraw()
|
||||||
{
|
{
|
||||||
if(mPostedPostsModel)
|
if(mPostedPostsModel)
|
||||||
{
|
|
||||||
// // Save selection. This can only be done using message Ids, because the QModelIndex-es can change after deepUpdate
|
|
||||||
//
|
|
||||||
// auto lst = ui->postsTree->selectionModel()->selectedRows();
|
|
||||||
// std::set<RsGxsMessageId> msgs;
|
|
||||||
//
|
|
||||||
// for(auto& index: lst)
|
|
||||||
// msgs.insert(index.data(Qt::UserRole).value<RsPostedPost>().mMeta.mMsgId) ;
|
|
||||||
|
|
||||||
mPostedPostsModel->deepUpdate();
|
mPostedPostsModel->deepUpdate();
|
||||||
|
|
||||||
// // Restore selection
|
|
||||||
//
|
|
||||||
// for(auto& msgId: msgs)
|
|
||||||
// ui->postsTree->selectionModel()->select(mPostedPostsModel->getIndexOfMessage(msgId), QItemSelectionModel::ClearAndSelect);
|
|
||||||
//
|
|
||||||
// update();
|
|
||||||
// ui->postsTree->update();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PostedListWidgetWithModel::updateDisplay(bool complete)
|
void PostedListWidgetWithModel::updateDisplay(bool complete)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user