summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-10-04 10:20:56 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-10-04 10:20:56 (GMT)
commit05f6fa0dc5cd09a1a493cef8d8f0dbcd47a36584 (patch)
tree6b4dded0adf8d573eb98629c8966f94491c650be
parent373c3ebeac6e75dacc84f5298cbcfb0f321726aa (diff)
If no crosshair is present, center around the tracking box on mouse wheel events
-rw-r--r--kstars/fitsviewer/fitsview.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/kstars/fitsviewer/fitsview.cpp b/kstars/fitsviewer/fitsview.cpp
index 94a7d0e..528c7f6 100644
--- a/kstars/fitsviewer/fitsview.cpp
+++ b/kstars/fitsviewer/fitsview.cpp
@@ -836,6 +836,13 @@ void FITSView::wheelEvent(QWheelEvent* event)
ensureVisible(x0,y0, image_width/2, image_height/2);
}
+ else if (trackingBoxEnabled)
+ {
+ int x0 = trackingBox.x() * (currentZoom / ZOOM_DEFAULT);
+ int y0 = trackingBox.y() * (currentZoom / ZOOM_DEFAULT);
+
+ ensureVisible(x0,y0, image_width/2, image_height/2);
+ }
}
void FITSView::initDisplayImage()