In the statistics tree, the U/D ratio is shown only if the counters for the session are both >0. In particular, I'm referring to the function CStatTreeItemRatio::GetString() in StatTree.cpp.
Would be nice to always show the total U/D ratio, regardless of the session counters.
Something like that (I'm just showing the code to better focus what I mean):
if (v1 > 0 && v2 > 0) {
if (v2 < v1) {
ret = CFormat(wxT("%.2f : 1")) % (v1 / v2);
} else {
ret = CFormat(wxT("1 : %.2f")) % (v2 / v1);
}
if (m_totalfunc1 && m_totalfunc2) {
double t1 = m_totalfunc1() + v1;
double t2 = m_totalfunc2() + v2;
if (t2 < t1) {
ret += CFormat(wxT(" (%.2f : 1)")) % (t1 / t2);
} else {
ret += CFormat(wxT(" (1 : %.2f)")) % (t2 / t1);
}
}
} else {
ret = _("Not available");
/***
/*** Add total ratio here ***
/***
if (m_totalfunc1 && m_totalfunc2) {
double t1 = m_totalfunc1() + v1;
double t2 = m_totalfunc2() + v2;
if (t2 < t1) {
ret += CFormat(wxT(" (%.2f : 1)")) % (t1 / t2);
} else {
ret += CFormat(wxT(" (1 : %.2f)")) % (t2 / t1);
}
}
/***
/*** end modification ***
/***
}
In the statistics tree, the U/D ratio is shown only if the counters for the session are both >0. In particular, I'm referring to the function
CStatTreeItemRatio::GetString()
in StatTree.cpp. Would be nice to always show the total U/D ratio, regardless of the session counters.Something like that (I'm just showing the code to better focus what I mean):
Screenshot (italian interface):