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
This commit is contained in:
Charlie Fenton 2008-11-12 09:30:22 +00:00
parent f3b0995cf4
commit dbb41700b6
4 changed files with 31 additions and 3 deletions

View File

@ -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

View File

@ -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"));

View File

@ -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();
}

View File

@ -119,6 +119,7 @@ public:
void RestoreSelections();
void ClearSavedSelections();
void ClearSelections();
void RefreshTaskPane();
std::vector<CTaskItemGroup*> m_TaskGroups;