Official eMule-Board: Statistics Dialog Minor Bug: X Axis Time. - Official eMule-Board

Jump to content


Page 1 of 1

Statistics Dialog Minor Bug: X Axis Time. Time displays incorrectly-scope v.small.

#1 User is offline   BlueSonicBoy 

  • Magnificent Member
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 396
  • Joined: 26-September 04

Posted 27 April 2006 - 08:20 PM

Thanks to leuk_he for pointing me in the direction of this. :flowers:

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. :+1:

Also related:
Cstatisticsdlg::oninitdialog() - Bug Fix., stats window not restored in some cases.
Statistics Dialog Minor Visual Improvement., Hides statistics tree properly...


0

  • Member Options

Page 1 of 1

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users