summaryrefslogtreecommitdiffstats
path: root/qt-ui/profilegraphics.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-05-10 10:30:24 -0300
committerGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-05-10 10:30:24 -0300
commit93d3af768b86602b3b13062705cb2d12db82b5a2 (patch)
tree033374f65c18fb92d559fc55bdf3562786b5c57a /qt-ui/profilegraphics.cpp
parented6a54f5066f3220ce357f9cf7686fc4d72079dd (diff)
downloadsubsurface-93d3af768b86602b3b13062705cb2d12db82b5a2.tar.gz
Uses the correct rectangle to englobe the profile grid.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui/profilegraphics.cpp')
-rw-r--r--qt-ui/profilegraphics.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/qt-ui/profilegraphics.cpp b/qt-ui/profilegraphics.cpp
index 44af49e7c..4d900aa73 100644
--- a/qt-ui/profilegraphics.cpp
+++ b/qt-ui/profilegraphics.cpp
@@ -249,9 +249,9 @@ void ProfileGraphicsView::plot(struct dive *d)
*/
calculate_max_limits(dive, dc, &gc);
- QRectF drawing_area = scene()->sceneRect();
- gc.maxx = (drawing_area.width() - 2 * drawing_area.x());
- gc.maxy = (drawing_area.height() - 2 * drawing_area.y());
+ QRectF profile_grid_area = scene()->sceneRect();
+ gc.maxx = (profile_grid_area.width() - 2 * profile_grid_area.x());
+ gc.maxy = (profile_grid_area.height() - 2 * profile_grid_area.y());
dc = select_dc(dc);
@@ -281,7 +281,7 @@ void ProfileGraphicsView::plot(struct dive *d)
/* Bounding box */
QPen pen = defaultPen;
pen.setColor(profile_color[TIME_GRID].at(0));
- QGraphicsRectItem *rect = new QGraphicsRectItem(scene()->sceneRect());
+ QGraphicsRectItem *rect = new QGraphicsRectItem(profile_grid_area);
rect->setPen(pen);
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_text();
- //}
+ }
/* now shift the translation back by half the margin;