removed mUpdating variable which was used for a safety test that is not relevant anymore and caused problems

This commit is contained in:
csoler 2018-12-09 23:25:59 +01:00
parent 34f51fff9c
commit 1dda7c5b34
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
2 changed files with 17 additions and 15 deletions

View file

@ -324,7 +324,7 @@ GxsForumThreadWidget::GxsForumThreadWidget(const RsGxsGroupId &forumId, QWidget
setUpdateWhenInvisible(true); setUpdateWhenInvisible(true);
mUpdating = false; //mUpdating = false;
mUnreadCount = 0; mUnreadCount = 0;
mNewCount = 0; mNewCount = 0;
@ -639,6 +639,7 @@ void GxsForumThreadWidget::updateDisplay(bool complete)
#ifdef DEBUG_FORUMS #ifdef DEBUG_FORUMS
std::cerr << "udateDisplay: groupId()=" << groupId()<< std::endl; std::cerr << "udateDisplay: groupId()=" << groupId()<< std::endl;
#endif #endif
#ifdef TO_REMOVE
if(mUpdating) if(mUpdating)
{ {
#ifdef DEBUG_FORUMS #ifdef DEBUG_FORUMS
@ -646,6 +647,7 @@ void GxsForumThreadWidget::updateDisplay(bool complete)
#endif #endif
return; return;
} }
#endif
if(groupId().isNull()) if(groupId().isNull())
{ {
@ -713,7 +715,7 @@ void GxsForumThreadWidget::updateDisplay(bool complete)
{ {
saveExpandedItems(mSavedExpandedMessages); saveExpandedItems(mSavedExpandedMessages);
mUpdating=true; //mUpdating=true;
updateGroupData(); updateGroupData();
mThreadModel->updateForum(groupId()); mThreadModel->updateForum(groupId());
@ -955,8 +957,8 @@ void GxsForumThreadWidget::togglethreadview_internal()
void GxsForumThreadWidget::changedVersion() void GxsForumThreadWidget::changedVersion()
{ {
if(mUpdating) //if(mUpdating)
return; // return;
mThreadId = RsGxsMessageId(ui->versions_CB->itemData(ui->versions_CB->currentIndex()).toString().toStdString()) ; mThreadId = RsGxsMessageId(ui->versions_CB->itemData(ui->versions_CB->currentIndex()).toString().toStdString()) ;
@ -966,8 +968,8 @@ void GxsForumThreadWidget::changedVersion()
void GxsForumThreadWidget::changedThread(QModelIndex index) void GxsForumThreadWidget::changedThread(QModelIndex index)
{ {
if(mUpdating) //if(mUpdating)
return; // return;
if(!index.isValid()) if(!index.isValid())
{ {
@ -1003,13 +1005,13 @@ void GxsForumThreadWidget::clickedThread(QModelIndex index)
std::cerr << "Clicked on message ID " << mThreadId << ", index=" << index << std::endl; std::cerr << "Clicked on message ID " << mThreadId << ", index=" << index << std::endl;
#endif #endif
if(mUpdating) // if(mUpdating)
{ // {
#ifdef DEBUG_FORUMS //#ifdef DEBUG_FORUMS
std::cerr << " early return because mUpdating=true" << std::endl; // std::cerr << " early return because mUpdating=true" << std::endl;
#endif //#endif
return; // return;
} // }
if(!index.isValid()) if(!index.isValid())
{ {
@ -1772,7 +1774,7 @@ void GxsForumThreadWidget::postForumLoading()
ui->threadTreeWidget->update(); ui->threadTreeWidget->update();
recursRestoreExpandedItems(mThreadProxyModel->mapFromSource(mThreadModel->root()),mSavedExpandedMessages); recursRestoreExpandedItems(mThreadProxyModel->mapFromSource(mThreadModel->root()),mSavedExpandedMessages);
mUpdating = false; //mUpdating = false;
} }
void GxsForumThreadWidget::updateGroupData() void GxsForumThreadWidget::updateGroupData()
{ {

View file

@ -177,7 +177,7 @@ private:
RsGxsMessageId mThreadId; RsGxsMessageId mThreadId;
RsGxsMessageId mOrigThreadId; RsGxsMessageId mOrigThreadId;
RsGxsForumGroup mForumGroup; RsGxsForumGroup mForumGroup;
bool mUpdating; //bool mUpdating;
bool mInProcessSettings; bool mInProcessSettings;
bool mInMsgAsReadUnread; bool mInMsgAsReadUnread;
int mLastViewType; int mLastViewType;