summaryrefslogtreecommitdiffstats
path: root/grapher/Graph.cxx
diff options
context:
space:
mode:
authorTim Moore <timoore@redhat.com>2009-12-22 23:30:56 +0100
committerTim Moore <timoore@redhat.com>2009-12-23 00:15:24 +0100
commit72195f6b17c0ed2e508c58bf3cadd5b9dc4e28ac (patch)
treecd1b20b74695e53d601583427e4ef7c0eb8604af /grapher/Graph.cxx
parent4fca37ae3561da7d0664e0f943146398a8e554dd (diff)
downloadsystemtap-steved-72195f6b17c0ed2e508c58bf3cadd5b9dc4e28ac.tar.gz
systemtap-steved-72195f6b17c0ed2e508c58bf3cadd5b9dc4e28ac.tar.xz
systemtap-steved-72195f6b17c0ed2e508c58bf3cadd5b9dc4e28ac.zip
grapher: remove _zoomFactor from horizontal scaling calculation
This makes zooming more consistent and less buggy. * grapher/Graph.cxx (Graph::draw): Set graph time spread using _zoomFactor. * grapher/Graph.hxx (Graph::getHorizontalScale): no _zoomFactor * grapher/GraphWidget.cxx (on_motion_notify_event): Dragging increment uses _zoomFactor. (on_scroll_event): Set extents after changing the zoom factor with the scroll wheel.
Diffstat (limited to 'grapher/Graph.cxx')
-rw-r--r--grapher/Graph.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/grapher/Graph.cxx b/grapher/Graph.cxx
index 4d697ae6..079cd63e 100644
--- a/grapher/Graph.cxx
+++ b/grapher/Graph.cxx
@@ -44,7 +44,7 @@ void Graph::draw(Cairo::RefPtr<Cairo::Context> cr)
// Find latest time.
_right = _currentTime / 1000;
// Assume 1 pixel = 5 milliseconds
- _left = _right - 5000;
+ _left = _right - static_cast<int64_t>(5000 / _zoomFactor);
}
cr->save();
double horizScale = getHorizontalScale();