Overview Summary Chart fix for that last fix

This commit is contained in:
Mark Watkins 2011-12-01 13:45:49 +10:00
parent f4600395c9
commit 4d3fc5b4ca
2 changed files with 11 additions and 14 deletions

View File

@ -44,7 +44,8 @@ void SummaryChart::SetDay(Day * nullday)
m_times.clear();
m_days.clear();
m_hours.clear();
m_badcodes.clear();
m_goodcodes.clear();
m_goodcodes[""]=1;
m_miny=999999999;
m_maxy=-999999999;
m_minx=0;
@ -132,17 +133,13 @@ void SummaryChart::SetDay(Day * nullday)
tmp-=suboffset;
if (tmp<0) tmp=0;
}
//if (tmp>0) {
fnd=true;
total+=tmp;
m_values[dn][j+1]=tmp;
if (tmp<m_miny) m_miny=tmp;
if (tmp>m_maxy) m_maxy=tmp;
m_goodcodes[code]=1;
break;
// }
} else {
m_badcodes[code]=1;
}
}
}
@ -434,7 +431,7 @@ void SummaryChart::paint(gGraph & w,int left, int top, int width, int height)
for (int j=0;j<m_codes.size();j++) {
if (totalcounts[j]==0) continue;
if (m_badcodes.contains(m_codes[j])) continue;
if (!m_goodcodes.contains(m_codes[j])) continue;
a=schema::channel[m_codes[j]].label();
a+=" ";
switch(m_type[j]) {

View File

@ -33,7 +33,7 @@ class SummaryChart:public Layer
QVector<QColor> m_colors;
QVector<ChannelID> m_codes;
QHash<ChannelID,char> m_badcodes;
QHash<ChannelID,char> m_goodcodes;
QVector<SummaryType> m_type;
QHash<int,QHash<short,EventDataType> > m_values;
QHash<int,QHash<short,EventDataType> > m_times;