Fix for missing details data in channelHasData function

This commit is contained in:
Mark Watkins 2011-10-30 14:35:55 +10:00
parent 7ce9896075
commit 334879114d
2 changed files with 8 additions and 5 deletions

View File

@ -349,12 +349,13 @@ bool Day::channelExists(ChannelID id)
}
bool Day::channelHasData(ChannelID id)
{
bool r=false;
for (int i=0;i<sessions.size();i++) {
if (!sessions[i]->channelExists(id)) {
return false;
if (sessions[i]->channelExists(id)) {
r=true;
}
}
return true;
return r;
}
void Day::OpenEvents()

View File

@ -358,6 +358,7 @@ void Daily::on_calendar_selectionChanged()
Load(ui->calendar->selectedDate());
ui->calButton->setText(ui->calendar->selectedDate().toString(Qt::TextDate));
ui->calendar->setFocus(Qt::ActiveWindowFocusReason);
}
void Daily::ResetGraphLayout()
{
@ -865,8 +866,9 @@ void Daily::on_nextDayButton_clicked()
void Daily::on_calButton_toggled(bool checked)
{
ui->calendar->setVisible(checked);
if (!checked) ui->calButton->setArrowType(Qt::DownArrow);
bool b=!ui->calendar->isVisible();
ui->calendar->setVisible(b);
if (!b) ui->calButton->setArrowType(Qt::DownArrow);
else ui->calButton->setArrowType(Qt::UpArrow);
}