mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-17 17:43:59 -05:00
fixed selection of current item from link in channels
This commit is contained in:
parent
1c2e094f20
commit
97ad766863
2 changed files with 4 additions and 8 deletions
|
|
@ -425,8 +425,6 @@ void GxsChannelPostsWidgetWithModel::showPostDetails()
|
|||
ui->postTime_LB->hide();
|
||||
mChannelPostFilesModel->clear();
|
||||
|
||||
std::cerr << "showPostDetails: no valid post. Clearing mSelectedPost." << std::endl;
|
||||
mSelectedPost.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -540,9 +538,8 @@ void GxsChannelPostsWidgetWithModel::postChannelPostLoad()
|
|||
<< mSelectedPost.toStdString() << std::endl;
|
||||
|
||||
ui->postsTree->selectionModel()->setCurrentIndex(index,QItemSelectionModel::ClearAndSelect);
|
||||
ui->postsTree->scrollTo(ui->postsTree->currentIndex());//May change if model reloaded
|
||||
ui->postsTree->scrollTo(index);//May change if model reloaded
|
||||
ui->postsTree->setFocus();
|
||||
ui->postsTree->update();
|
||||
}
|
||||
else
|
||||
std::cerr << "No pre-selected channel post." << std::endl;
|
||||
|
|
@ -1049,9 +1046,8 @@ bool GxsChannelPostsWidgetWithModel::navigate(const RsGxsMessageId& msgId)
|
|||
}
|
||||
|
||||
ui->postsTree->selectionModel()->setCurrentIndex(index,QItemSelectionModel::ClearAndSelect);
|
||||
ui->postsTree->scrollTo(ui->postsTree->currentIndex());//May change if model reloaded
|
||||
ui->postsTree->scrollTo(index);//May change if model reloaded
|
||||
ui->postsTree->setFocus();
|
||||
ui->postsTree->update();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue