From 4a9f81d6ce73f95043bff6f6b3bb480283355244 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Thu, 17 Jan 2013 04:20:41 -0800 Subject: [PATCH] MGR: clear Simple View Notices when disconnected and don't display "Fetching notices" until connected to client --- clientgui/NoticeListCtrl.cpp | 5 ----- clientgui/sg_DlgMessages.cpp | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/clientgui/NoticeListCtrl.cpp b/clientgui/NoticeListCtrl.cpp index c38833416b..d5b12d3fda 100644 --- a/clientgui/NoticeListCtrl.cpp +++ b/clientgui/NoticeListCtrl.cpp @@ -550,13 +550,8 @@ wxString CNoticeListCtrl::OnGetItem(size_t i) const { void CNoticeListCtrl::Clear() { - int oldItemCount = GetItemCount(); - SetItemCount(0); m_bNeedsReloading = true; UpdateUI(); - if (oldItemCount) { // Prevents covering Fetching Notices text - Refresh(); - } } diff --git a/clientgui/sg_DlgMessages.cpp b/clientgui/sg_DlgMessages.cpp index 1efdb0d3a4..de9d77b958 100644 --- a/clientgui/sg_DlgMessages.cpp +++ b/clientgui/sg_DlgMessages.cpp @@ -180,6 +180,7 @@ void CPanelMessages::CreateControls() ); m_NoNoticesText->SetBackgroundColour(*wxWHITE); + m_FetchingNoticesText->Hide(); m_NoNoticesText->Hide(); m_ReloadNoticesPanel->Hide(); Layout(); @@ -283,6 +284,8 @@ void CPanelMessages::OnRefresh() { Layout(); } } + } else { + m_pHtmlListPane->Clear(); } // Don't call Freeze() / Thaw() here because it causes an unnecessary redraw