mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-17 17:43:59 -05:00
Merge pull request #15 from defnax/small-fixes
Clear more fields when blank tree is selected
This commit is contained in:
commit
800a7499d8
2 changed files with 67 additions and 55 deletions
|
|
@ -413,6 +413,12 @@ void GxsChannelPostsWidgetWithModel::showPostDetails()
|
|||
{
|
||||
QModelIndex index = ui->postsTree->selectionModel()->currentIndex();
|
||||
RsGxsChannelPost post = index.data(Qt::UserRole).value<RsGxsChannelPost>() ;
|
||||
|
||||
QTextDocument doc;
|
||||
doc.setHtml(post.mMsg.c_str());
|
||||
|
||||
if(doc.toPlainText().trimmed().isEmpty())
|
||||
ui->postDetails_TE->setPlaceholderText(tr("No message in this post"));
|
||||
|
||||
if(post.mMeta.mPublishTs == 0)
|
||||
{
|
||||
|
|
@ -545,7 +551,7 @@ void GxsChannelPostsWidgetWithModel::postChannelPostLoad()
|
|||
//ui->channelFiles_TV->resizeColumnToContents(RsGxsChannelPostFilesModel::COLUMN_FILES_FILE);
|
||||
//ui->channelFiles_TV->resizeColumnToContents(RsGxsChannelPostFilesModel::COLUMN_FILES_SIZE);
|
||||
ui->channelFiles_TV->setAutoSelect(true);
|
||||
|
||||
ui->postDetails_TE->setPlaceholderText(tr("No post selected"));
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1007,7 +1013,7 @@ void GxsChannelPostsWidgetWithModel::blank()
|
|||
{
|
||||
ui->postButton->setEnabled(false);
|
||||
ui->subscribeToolButton->setEnabled(false);
|
||||
|
||||
|
||||
ui->channelName_LB->setText(tr("No Channel Selected"));
|
||||
ui->logoLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/channels.png"));
|
||||
ui->infoPosts->setText("");
|
||||
|
|
@ -1018,6 +1024,12 @@ void GxsChannelPostsWidgetWithModel::blank()
|
|||
ui->infoDescription->setText("");
|
||||
|
||||
mChannelPostsModel->clear();
|
||||
mChannelPostFilesModel->clear();
|
||||
ui->postDetails_TE->clear();
|
||||
ui->postDetails_TE->setPlaceholderText(tr("No post selected"));
|
||||
ui->postLogo_LB->hide();
|
||||
ui->postName_LB->hide();
|
||||
ui->postTime_LB->hide();
|
||||
groupNameChanged(QString());
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue