From b161d44800a649100f0a6ed07a338cec9c212ecd Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 29 Jan 2007 16:19:51 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=11994 --- checkin_notes | 10 ++++++++++ client/client_state.C | 2 +- client/client_types.C | 4 ++-- clientgui/ViewStatistics.cpp | 6 +++--- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/checkin_notes b/checkin_notes index 308284c87a..1a985ce5d5 100755 --- a/checkin_notes +++ b/checkin_notes @@ -1288,3 +1288,13 @@ Rom 28 Jan 2007 clientgui/ BOINCGridCtrl.cpp, .h ViewProjectsGrid.cpp, .h + +David 29 Jan 2007 + - core client: fix account-manager resource share logic + - manager: Statistics tab fixes (from Mifistor) + + client/ + client_state.C + client_types.C + clientgui/ + ViewStatistics.cpp diff --git a/client/client_state.C b/client/client_state.C index 756c04e17b..92f9dd02cb 100644 --- a/client/client_state.C +++ b/client/client_state.C @@ -1308,7 +1308,7 @@ int CLIENT_STATE::reset_project(PROJECT* project) { } project->duration_correction_factor = 1; - project->ams_resource_share = 0; + project->ams_resource_share = -1; write_state_file(); return 0; } diff --git a/client/client_types.C b/client/client_types.C index 204bab68d7..40b394ab2e 100644 --- a/client/client_types.C +++ b/client/client_types.C @@ -264,7 +264,7 @@ int PROJECT::write_state(MIOFILE& out, bool gui_rpc) { attached_via_acct_mgr?" \n":"", (this == gstate.scheduler_op->cur_proj)?" \n":"" ); - if (ams_resource_share) { + if (ams_resource_share >= 0) { out.printf(" %f\n", ams_resource_share ); @@ -333,7 +333,7 @@ void PROJECT::copy_state_fields(PROJECT& p) { attached_via_acct_mgr = p.attached_via_acct_mgr; duration_correction_factor = p.duration_correction_factor; ams_resource_share = p.ams_resource_share; - if (ams_resource_share) { + if (ams_resource_share > 0) { resource_share = ams_resource_share; } } diff --git a/clientgui/ViewStatistics.cpp b/clientgui/ViewStatistics.cpp index adf7b87f3c..d997921764 100644 --- a/clientgui/ViewStatistics.cpp +++ b/clientgui/ViewStatistics.cpp @@ -1430,15 +1430,15 @@ void CPaintStatistics::OnLeftMouseDown(wxMouseEvent& event) { m_GraphZoomStart = true; }else if (m_Legend_dY > 0){ if((double(pt.y) > m_Legend_select_Y_start) && (double(pt.y) < m_Legend_select_Y_end) && (double(pt.x) > m_Legend_select_X_start) && (double(pt.x) < m_Legend_select_X_end)){ - int i1 = (int)floor((double(pt.y) - m_Legend_select_Y_start) / m_Legend_dY) + m_Legend_Shift_Mode1; + int i1 = (int)floor((double(pt.y) - m_Legend_select_Y_start) / m_Legend_dY); switch (m_ModeViewStatistic){ case 1: - m_NextProjectStatistic = i1; + m_NextProjectStatistic = i1 + m_Legend_Shift_Mode1; m_Zoom_Auto = true; m_GraphMarker1 = false; break; case 2: - m_ViewHideProjectStatistic = i1; + m_ViewHideProjectStatistic = i1 + m_Legend_Shift_Mode2; break; } m_full_repaint = true;