mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 18:50:44 +00:00
1.1.0-testing-4 plus fix to overview graph
This commit is contained in:
parent
87d4d0f7b2
commit
a8dc05c3f5
@ -422,11 +422,20 @@ void gSummaryChart::paint(QPainter &painter, gGraph &graph, const QRegion ®io
|
||||
|
||||
int idx = idx_start;
|
||||
|
||||
// Determine how many days after the first day of the chart that this data is to begin
|
||||
int numDaysOffset = 0;
|
||||
if (firstday > date) {
|
||||
if (firstday > date) { // date = beginning date of chart; firstday = beginning date of data
|
||||
numDaysOffset = date.daysTo(firstday);
|
||||
}
|
||||
|
||||
// Determine how many days before the last day of the chart that this data is to end
|
||||
int numDaysAfter = 0;
|
||||
if (enddate > lastday) { // enddate = last date of chart; lastday = last date of data
|
||||
numDaysAfter = lastday.daysTo(enddate);
|
||||
}
|
||||
if (numDaysAfter > days) // Nothing to do if this data is off the left edge of the chart
|
||||
return;
|
||||
|
||||
auto ite = dayindex.find(enddate);
|
||||
idx_end = daylist.size()-1;
|
||||
if (ite != dayindex.end()) {
|
||||
@ -838,11 +847,20 @@ void gSessionTimesChart::paint(QPainter &painter, gGraph &graph, const QRegion &
|
||||
idx = it.value();
|
||||
}
|
||||
|
||||
// Determine how many days after the first day of the chart that this data is to begin
|
||||
int numDaysOffset = 0;
|
||||
if (firstday > date) {
|
||||
if (firstday > date) { // date = beginning date of chart; firstday = beginning date of data
|
||||
numDaysOffset = date.daysTo(firstday);
|
||||
}
|
||||
|
||||
// Determine how many days before the last day of the chart that this data is to end
|
||||
int numDaysAfter = 0;
|
||||
if (enddate > lastday) { // enddate = last date of chart; lastday = last date of data
|
||||
numDaysAfter = lastday.daysTo(enddate);
|
||||
}
|
||||
if (numDaysAfter > days) // Nothing to do if this data is off the left edge of the chart
|
||||
return;
|
||||
|
||||
// float lasty1 = rect.bottom();
|
||||
float lastx1 = rect.left();
|
||||
lastx1 += numDaysOffset * barw;
|
||||
|
Loading…
Reference in New Issue
Block a user