Fix magnifier starting at wrong pos

This commit is contained in:
ArsenArsen 2017-12-08 12:20:04 +01:00
parent ee625efd1d
commit 1a22158b3d
No known key found for this signature in database
GPG Key ID: 683D2F43B0CA4BD2
1 changed files with 2 additions and 0 deletions

View File

@ -11,6 +11,7 @@
#include <utils.hpp>
ScreenOverlay::ScreenOverlay(QPixmap pixmap, QObject *parent) : QGraphicsScene(parent), _pixmap(pixmap) {
setCursorPos(QCursor::pos());
addPixmap(pixmap)->setZValue(-1);
QPolygonF cursorPoly;
cursorPoly << QPoint(-10, 0) //
@ -159,6 +160,7 @@ void ScreenOverlay::setHighlight(QColor highlight) {
if (gridRectsX.isEmpty() || gridRectsY.isEmpty()) return;
gridRectsX[i]->setBrush(c);
gridRectsY[i]->setBrush(c);
updateMag();
highlightChanged(highlight);
}