Force scroll to bottom of Details web view when hiding/showing sessions

This commit is contained in:
Mark Watkins 2011-12-29 06:15:25 +10:00
parent 48777787b1
commit 96a0f7bed5

View File

@ -15,6 +15,7 @@
#include <QResizeEvent>
#include <QScrollBar>
#include <QSpacerItem>
#include <QWebFrame>
#include <cmath>
//#include <QPrinter>
//#include <QProgressBar>
@ -362,6 +363,7 @@ void Daily::Link_clicked(const QUrl &url)
// Reload day
this->LoadDate(previous_date);
ui->webView->page()->mainFrame()->setScrollBarValue(Qt::Vertical, ui->webView->page()->mainFrame()->scrollBarMaximum(Qt::Vertical));
return;
} else if (code=="toggleoxisession") { // Enable/Disable Oximetry session
day=PROFILE.GetDay(previous_date,MT_OXIMETER);
@ -374,6 +376,7 @@ void Daily::Link_clicked(const QUrl &url)
// Reload day
this->LoadDate(previous_date);
ui->webView->page()->mainFrame()->setScrollBarValue(Qt::Vertical, ui->webView->page()->mainFrame()->scrollBarMaximum(Qt::Vertical));
return;
} else if (code=="cpap") {
day=PROFILE.GetDay(previous_date,MT_CPAP);