mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-31 18:36:24 -05:00
update posts when navigating with arrows
This commit is contained in:
parent
55022432ef
commit
4423600073
@ -343,6 +343,7 @@ GxsForumThreadWidget::GxsForumThreadWidget(const RsGxsGroupId &forumId, QWidget
|
||||
ui->newthreadButton->setText(tr("New thread"));
|
||||
|
||||
connect(ui->threadTreeWidget, SIGNAL(clicked(QModelIndex)), this, SLOT(clickedThread(QModelIndex)));
|
||||
connect(ui->threadTreeWidget->selectionModel(), SIGNAL(currentChanged(const QModelIndex&,const QModelIndex&)), this, SLOT(changedSelection(const QModelIndex&,const QModelIndex&)));
|
||||
connect(ui->viewBox, SIGNAL(currentIndexChanged(int)), this, SLOT(changedViewBox()));
|
||||
|
||||
connect(ui->expandButton, SIGNAL(clicked()), this, SLOT(togglethreadview()));
|
||||
@ -497,6 +498,11 @@ void GxsForumThreadWidget::processSettings(bool load)
|
||||
Settings->endGroup();
|
||||
}
|
||||
|
||||
void GxsForumThreadWidget::changedSelection(const QModelIndex& current,const QModelIndex&)
|
||||
{
|
||||
changedThread(current);
|
||||
}
|
||||
|
||||
void GxsForumThreadWidget::groupIdChanged()
|
||||
{
|
||||
ui->forumName->setText(groupId().isNull () ? "" : tr("Loading..."));
|
||||
@ -628,12 +634,12 @@ QModelIndex GxsForumThreadWidget::GxsForumThreadWidget::getCurrentIndex() const
|
||||
}
|
||||
bool GxsForumThreadWidget::getCurrentPost(ForumModelPostEntry& fmpe) const
|
||||
{
|
||||
QModelIndex index = getCurrentIndex() ;
|
||||
QModelIndex indx = getCurrentIndex() ;
|
||||
|
||||
if(!index.isValid())
|
||||
if(!indx.isValid())
|
||||
return false ;
|
||||
|
||||
return mThreadModel->getPostData(mThreadProxyModel->mapToSource(index),fmpe);
|
||||
return mThreadModel->getPostData(mThreadProxyModel->mapToSource(indx),fmpe);
|
||||
}
|
||||
|
||||
void GxsForumThreadWidget::threadListCustomPopupMenu(QPoint /*point*/)
|
||||
|
@ -32,6 +32,7 @@ class QTreeWidgetItem;
|
||||
class RSTreeWidgetItemCompareRole;
|
||||
class RsGxsForumMsg;
|
||||
class GxsForumsFillThread;
|
||||
class QItemSelection;
|
||||
class RsGxsForumGroup;
|
||||
class RsGxsForumModel;
|
||||
class RsGxsForumMsg;
|
||||
@ -97,6 +98,7 @@ private slots:
|
||||
void threadListCustomPopupMenu(QPoint point);
|
||||
void contextMenuTextBrowser(QPoint point);
|
||||
|
||||
void changedSelection(const QModelIndex &, const QModelIndex &);
|
||||
void changedThread(QModelIndex index);
|
||||
void changedVersion();
|
||||
void clickedThread (QModelIndex index);
|
||||
|
Loading…
Reference in New Issue
Block a user