From dbb41700b66d3d98eeaa373ad1cae6c86996580a Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Wed, 12 Nov 2008 09:30:22 +0000 Subject: [PATCH] MGR: Erase and refresh entire Tasks panel when selecting a new tab to try to fix cosmetic bug reported by David on Windows svn path=/trunk/boinc/; revision=16484 --- checkin_notes | 8 ++++++++ clientgui/AdvancedFrame.cpp | 15 +++++++++++++-- clientgui/BOINCBaseView.cpp | 8 ++++++++ clientgui/BOINCBaseView.h | 3 ++- 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/checkin_notes b/checkin_notes index f7e4e28c77..77e7c0c988 100644 --- a/checkin_notes +++ b/checkin_notes @@ -9396,3 +9396,11 @@ David 11 Nov 2008 samples/example_app/ Makefile + +Charlie 12 Nov 2008 + - MGR: Erase and refresh entire Tasks panel when selecting a new tab + to try to fix cosmetic bug reported by David on Windows. + + clientgui/ + AdvancedFrame.cpp + BOINCBaseView.cpp, .h diff --git a/clientgui/AdvancedFrame.cpp b/clientgui/AdvancedFrame.cpp index 60b5538260..1c21e68ce1 100644 --- a/clientgui/AdvancedFrame.cpp +++ b/clientgui/AdvancedFrame.cpp @@ -1981,8 +1981,12 @@ void CAdvancedFrame::OnFrameRender(wxTimerEvent &event) { void CAdvancedFrame::OnNotebookSelectionChanged(wxNotebookEvent& event) { wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnNotebookSelectionChanged - Function Begin")); - if ((-1 != event.GetSelection())) { - UpdateRefreshTimerInterval(event.GetSelection()); + wxWindow* pwndNotebookPage = NULL; + CBOINCBaseView* pView = NULL; + int selection = event.GetSelection(); + + if ((-1 != selection)) { + UpdateRefreshTimerInterval(selection); CMainDocument* pDoc = wxGetApp().GetDocument(); wxASSERT(wxDynamicCast(pDoc, CMainDocument)); @@ -1991,6 +1995,13 @@ void CAdvancedFrame::OnNotebookSelectionChanged(wxNotebookEvent& event) { pDoc->RunPeriodicRPCs(); } + pwndNotebookPage = m_pNotebook->GetPage(selection); + wxASSERT(wxDynamicCast(pwndNotebookPage, CBOINCBaseView)); + + pView = wxDynamicCast(pwndNotebookPage, CBOINCBaseView); + wxASSERT(pView); + + pView->RefreshTaskPane(); event.Skip(); wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnNotebookSelectionChanged - Function End")); diff --git a/clientgui/BOINCBaseView.cpp b/clientgui/BOINCBaseView.cpp index cc486b5aea..def5d0b067 100644 --- a/clientgui/BOINCBaseView.cpp +++ b/clientgui/BOINCBaseView.cpp @@ -775,6 +775,14 @@ void CBOINCBaseView::UpdateWebsiteSelection(long lControlGroup, PROJECT* project } +// Make sure task pane background is properly erased +void CBOINCBaseView::RefreshTaskPane() { + if (m_pTaskPane) { + m_pTaskPane->Refresh(true); + } +} + + bool CBOINCBaseView::_IsSelectionManagementNeeded() { return IsSelectionManagementNeeded(); } diff --git a/clientgui/BOINCBaseView.h b/clientgui/BOINCBaseView.h index 6f3902fbb4..27620006f4 100644 --- a/clientgui/BOINCBaseView.h +++ b/clientgui/BOINCBaseView.h @@ -119,7 +119,8 @@ public: void RestoreSelections(); void ClearSavedSelections(); void ClearSelections(); - + void RefreshTaskPane(); + std::vector m_TaskGroups; int m_iSortColumn;