MGR: In Simple View, reload slide show when task selection changed

svn path=/trunk/boinc/; revision=24646
This commit is contained in:
Charlie Fenton 2011-11-24 02:04:21 +00:00
parent 089dc908e8
commit 7aa51c84c3
3 changed files with 12 additions and 6 deletions

View File

@ -8644,6 +8644,7 @@ David 21 Nov 2011
Charlie 23 Nov 2011
- MGR: In Simple View, if deleting a task above the current selection,
decrement the index of the current selection.
- MGR: In Simple View, reload slide show when task selection changed.
clientgui/
sg_TaskPanel.cpp
sg_TaskPanel.cpp,.h

View File

@ -76,15 +76,20 @@ CSlideShowPanel::~CSlideShowPanel()
void CSlideShowPanel::OnSlideShowTimer(wxTimerEvent& WXUNUSED(event)) {
AdvanceSlideShow(true);
AdvanceSlideShow(true, false);
}
void CSlideShowPanel::AdvanceSlideShow(bool changeSlide) {
void CSlideShowPanel::AdvanceSlideShow(bool changeSlide, bool reload) {
double xRatio, yRatio, ratio;
TaskSelectionData* selData = ((CSimpleTaskPanel*)GetParent())->GetTaskSelectionData();
if (selData == NULL) return;
if (reload) {
m_bCurrentSlideIsDefault = false;
selData->lastSlideShown = -1;
}
int numSlides = (int)selData->slideShowFileNames.size();
if (numSlides <= 0) {
@ -478,7 +483,7 @@ void CSimpleTaskPanel::UpdatePanel(bool delayShow) {
GetApplicationAndProjectNames(result, NULL, &projName);
#endif
UpdateStaticText(&m_TaskProjectName, projName);
m_SlideShowArea->AdvanceSlideShow(false);
m_SlideShowArea->AdvanceSlideShow(false, true);
m_bStableTaskInfoChanged = false;
}
float f = result->elapsed_time;
@ -528,7 +533,7 @@ void CSimpleTaskPanel::UpdatePanel(bool delayShow) {
void CSimpleTaskPanel::ReskinInterface() {
wxLogTrace(wxT("Function Start/End"), wxT("CSimpleTaskPanel::ReskinInterface - Function Begin"));
CSimplePanelBase::ReskinInterface();
m_SlideShowArea->AdvanceSlideShow(false);
m_SlideShowArea->AdvanceSlideShow(false, false);
UpdateTaskSelectionList(true);
wxLogTrace(wxT("Function Start/End"), wxT("CSimpleTaskPanel::ReskinInterface - Function Begin"));
}

View File

@ -50,7 +50,7 @@ class CSlideShowPanel : public wxPanel
~CSlideShowPanel();
void OnSlideShowTimer(wxTimerEvent& WXUNUSED(event));
void AdvanceSlideShow(bool changeSlide);
void AdvanceSlideShow(bool changeSlide, bool reload);
void OnPaint(wxPaintEvent& WXUNUSED(event));
private: