1
0
Fork 0
mirror of https://github.com/subsurface/subsurface.git synced 2025-02-19 22:16:15 +00:00

Uses the correct rectangle to englobe the profile grid.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
Tomaz Canabrava 2013-05-10 10:30:24 -03:00
parent ed6a54f506
commit 93d3af768b

View file

@ -249,9 +249,9 @@ void ProfileGraphicsView::plot(struct dive *d)
*/ */
calculate_max_limits(dive, dc, &gc); calculate_max_limits(dive, dc, &gc);
QRectF drawing_area = scene()->sceneRect(); QRectF profile_grid_area = scene()->sceneRect();
gc.maxx = (drawing_area.width() - 2 * drawing_area.x()); gc.maxx = (profile_grid_area.width() - 2 * profile_grid_area.x());
gc.maxy = (drawing_area.height() - 2 * drawing_area.y()); gc.maxy = (profile_grid_area.height() - 2 * profile_grid_area.y());
dc = select_dc(dc); dc = select_dc(dc);
@ -281,7 +281,7 @@ void ProfileGraphicsView::plot(struct dive *d)
/* Bounding box */ /* Bounding box */
QPen pen = defaultPen; QPen pen = defaultPen;
pen.setColor(profile_color[TIME_GRID].at(0)); pen.setColor(profile_color[TIME_GRID].at(0));
QGraphicsRectItem *rect = new QGraphicsRectItem(scene()->sceneRect()); QGraphicsRectItem *rect = new QGraphicsRectItem(profile_grid_area);
rect->setPen(pen); rect->setPen(pen);
scene()->addItem(rect); scene()->addItem(rect);
@ -296,10 +296,10 @@ void ProfileGraphicsView::plot(struct dive *d)
} }
//if (PP_GRAPHS_ENABLED) { if (PP_GRAPHS_ENABLED) {
plot_pp_gas_profile(); plot_pp_gas_profile();
plot_pp_text(); plot_pp_text();
//} }
/* now shift the translation back by half the margin; /* now shift the translation back by half the margin;