Commit 528adf11 authored by Dave DeMarle's avatar Dave DeMarle
Browse files

Merge branch 'charts-top-right-axis-bug-rel' into release

Change-Id: I7e73ec8f46bb1530e5688709c16d9cbacc9091c1
parents e3bc66fd f5ca6011
......@@ -1160,8 +1160,8 @@ bool vtkChartXY::MouseMoveEvent(const vtkContextMouseEvent &mouse)
// Figure out how much the mouse has moved by in plot coordinates - pan
vtkVector2d screenPos(mouse.GetScreenPos().Cast<double>().GetData());
vtkVector2d lastScreenPos(mouse.GetLastScreenPos().Cast<double>().GetData());
vtkVector2d pos(0.0);
vtkVector2d last(0.0);
vtkVector2d pos(0.0, 0.0);
vtkVector2d last(0.0, 0.0);
// Go from screen to scene coordinates to work out the delta
vtkTransform2D *transform =
......@@ -1188,6 +1188,11 @@ bool vtkChartXY::MouseMoveEvent(const vtkContextMouseEvent &mouse)
if (this->ChartPrivate->PlotCorners.size() > 2)
{
// Go from screen to scene coordinates to work out the delta
screenPos = vtkVector2d(mouse.GetScreenPos().Cast<double>().GetData());
lastScreenPos =
vtkVector2d(mouse.GetLastScreenPos().Cast<double>().GetData());
pos = vtkVector2d(0.0, 0.0);
last = vtkVector2d(0.0, 0.0);
transform = this->ChartPrivate->PlotCorners[2]->GetTransform();
transform->InverseTransformPoints(screenPos.GetData(), pos.GetData(), 1);
transform->InverseTransformPoints(lastScreenPos.GetData(), last.GetData(), 1);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment