As you can see in the above link. if you move the vertical splitter so far to the right, so that there is no x-axis/graph but the scopes and time are still displayed, you will see an invalid time displayed for the x-axis.
The fix is very simple, I have quoted a lot of code so you get context for the change.
In StatisticsDlg.cpp void CStatisticsDlg::ShowInterval()
void CStatisticsDlg::ShowInterval() said:
int shownSecs = plotRect.Width() * thePrefs.GetTrafficOMeterInterval();
// CB Mod ---> Make Setters
m_Statistics.m_nXPartial = m_DownloadOMeter.m_nXPartial = m_UploadOMeter.m_nXPartial = shownSecs % 3600;
m_Statistics.m_nXGrids = m_DownloadOMeter.m_nXGrids = m_UploadOMeter.m_nXGrids = shownSecs / 3600;
if(shownSecs <= 0)
{
m_DownloadOMeter.SetXUnits(GetResString(IDS_STOPPED));
m_UploadOMeter.SetXUnits(GetResString(IDS_STOPPED));
m_Statistics.SetXUnits(GetResString(IDS_STOPPED));
}
else
{
const CString buffer = CastSecondsToHM(shownSecs);
m_UploadOMeter.SetXUnits(buffer);
m_DownloadOMeter.SetXUnits(buffer);
m_Statistics.SetXUnits(buffer);
}
Thanks for reading.
Also related:
Cstatisticsdlg::oninitdialog() - Bug Fix., stats window not restored in some cases.
Statistics Dialog Minor Visual Improvement., Hides statistics tree properly...