mirror of https://github.com/BOINC/boinc.git
MGR: Work around bug in generic list control GetSelectedItemCount(); remove redundant UpdateSelection() call
svn path=/trunk/boinc/; revision=16996
This commit is contained in:
parent
f9cf9b656d
commit
b39cb9a217
|
@ -629,6 +629,12 @@ David 22 Jan 2009
|
||||||
|
|
||||||
Charlie Jan 22 2009
|
Charlie Jan 22 2009
|
||||||
- client sandbox: add details in switcher_exec "execv failed" message.
|
- client sandbox: add details in switcher_exec "execv failed" message.
|
||||||
|
- MGR: Work around bug in generic list control GetSelectedItemCount()
|
||||||
|
which caused incorrect update of buttons in Projects tab after
|
||||||
|
detching from a project; remove redundant UpdateSelection() call.
|
||||||
|
|
||||||
client/
|
client/
|
||||||
sandbox.cpp
|
sandbox.cpp
|
||||||
|
clientgui/
|
||||||
|
BOINCBaseView.cpp
|
||||||
|
BOINCListCtrl.cpp,.h
|
||||||
|
|
|
@ -318,7 +318,7 @@ void CBOINCBaseView::OnListRender(wxTimerEvent& event) {
|
||||||
|
|
||||||
// Find the previously selected items by their key values and reselect them
|
// Find the previously selected items by their key values and reselect them
|
||||||
RestoreSelections();
|
RestoreSelections();
|
||||||
UpdateSelection();
|
// UpdateSelection(); // This was called by RestoreSelections() if needed
|
||||||
|
|
||||||
m_bProcessingListRenderEvent = false;
|
m_bProcessingListRenderEvent = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -409,6 +409,19 @@ void MyEvtHandler::OnPaint(wxPaintEvent & event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Work around a bug in generic list control which doesn't
|
||||||
|
// adjust count when a selected item is deleted
|
||||||
|
int CBOINCListCtrl::GetSelectedItemCount() {
|
||||||
|
|
||||||
|
int i = -1, n = 0;
|
||||||
|
while (1) {
|
||||||
|
i = GetNextSelected(i);
|
||||||
|
if (i < 0) break;
|
||||||
|
n++;
|
||||||
|
}
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -91,6 +91,7 @@ private:
|
||||||
void DrawProgressBars(void);
|
void DrawProgressBars(void);
|
||||||
wxScrolledWindow* GetMainWin(void) { return (wxScrolledWindow*) m_mainWin; }
|
wxScrolledWindow* GetMainWin(void) { return (wxScrolledWindow*) m_mainWin; }
|
||||||
wxCoord GetHeaderHeight(void) { return m_headerHeight; }
|
wxCoord GetHeaderHeight(void) { return m_headerHeight; }
|
||||||
|
int GetSelectedItemCount();
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue