PRS1 Intentional Leak fixes, potential ResetBounds crash fix

This commit is contained in:
Mark Watkins 2011-11-28 17:37:54 +10:00
parent 2a6c8b5ac7
commit a77e64c72b
4 changed files with 8 additions and 7 deletions

View File

@ -1881,6 +1881,7 @@ void gGraphView::ResetBounds(bool refresh) //short group)
} }
} }
if (!g) g=m_graphs[0]; if (!g) g=m_graphs[0];
if (!g) return;
qint64 xx=g->max_x - g->min_x; qint64 xx=g->max_x - g->min_x;
double d=xx/86400000L; double d=xx/86400000L;

View File

@ -42,7 +42,7 @@ EventDataType gLineChart::Miny()
int m=Layer::Miny(); int m=Layer::Miny();
if (subtract_offset>0) { if (subtract_offset>0) {
m-=subtract_offset; m-=subtract_offset;
// if (m<0) m=0; if (m<0) m=0;
} }
return m; return m;
} }
@ -78,9 +78,9 @@ void gLineChart::paint(gGraph & w,int left, int top, int width, int height)
// hmmm.. subtract_offset.. // hmmm.. subtract_offset..
if (miny<0) { /*if (miny<0) {
miny=-MAX(fabs(miny),fabs(maxy)); miny=-MAX(fabs(miny),fabs(maxy));
} }*/
w.roundY(miny,maxy); w.roundY(miny,maxy);

View File

@ -88,7 +88,7 @@ void SummaryChart::SetDay(Day * nullday)
} }
if (suboffset>0) { if (suboffset>0) {
tmp-=suboffset; tmp-=suboffset;
//if (tmp<0) tmp=0; if (tmp<0) tmp=0;
} }
//if (tmp>0) { //if (tmp>0) {
fnd=true; fnd=true;

View File

@ -9,7 +9,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>599</width> <width>637</width>
<height>330</height> <height>330</height>
</rect> </rect>
</property> </property>
@ -38,7 +38,7 @@
<item> <item>
<widget class="QTabWidget" name="tabWidget"> <widget class="QTabWidget" name="tabWidget">
<property name="currentIndex"> <property name="currentIndex">
<number>4</number> <number>3</number>
</property> </property>
<widget class="QWidget" name="visualTab"> <widget class="QWidget" name="visualTab">
<attribute name="title"> <attribute name="title">
@ -159,7 +159,7 @@
This takes extra space, and has been known to cause problems on certain computer configurations, hence it's turned off by default.</string> This takes extra space, and has been known to cause problems on certain computer configurations, hence it's turned off by default.</string>
</property> </property>
<property name="text"> <property name="text">
<string>Graph Snapshots</string> <string>Event B/down Piechart</string>
</property> </property>
</widget> </widget>
</item> </item>