diff --git a/src/gui/activitywidget.cpp b/src/gui/activitywidget.cpp index 34a7b79a0fe..91af0aa957c 100644 --- a/src/gui/activitywidget.cpp +++ b/src/gui/activitywidget.cpp @@ -418,12 +418,23 @@ void ActivitySettings::slotRemoveAccount( AccountState *ptr ) void ActivitySettings::slotRefresh( AccountState* ptr ) { - if( ptr && ptr->isConnected() ) { + if( ptr && ptr->isConnected() && isVisible()) { _progressIndicator->startAnimation(); _activityWidget->slotRefresh(ptr); } } +bool ActivitySettings::event(QEvent* e) +{ + if (e->type() == QEvent::Show) { + AccountManager *am = AccountManager::instance(); + foreach (AccountStatePtr a, am->accounts()) { + slotRefresh(a.data()); + } + } + return QWidget::event(e); +} + ActivitySettings::~ActivitySettings() { diff --git a/src/gui/activitywidget.h b/src/gui/activitywidget.h index 8fcae675769..6b51f09f37a 100644 --- a/src/gui/activitywidget.h +++ b/src/gui/activitywidget.h @@ -182,6 +182,8 @@ public slots: void guiLog(const QString&, const QString&); private: + bool event(QEvent* e) Q_DECL_OVERRIDE; + QTabWidget *_tab; ActivityWidget *_activityWidget; ProtocolWidget *_protocolWidget;