Fix magnifier starting at wrong pos
This commit is contained in:
parent
ee625efd1d
commit
1a22158b3d
|
@ -11,6 +11,7 @@
|
||||||
#include <utils.hpp>
|
#include <utils.hpp>
|
||||||
|
|
||||||
ScreenOverlay::ScreenOverlay(QPixmap pixmap, QObject *parent) : QGraphicsScene(parent), _pixmap(pixmap) {
|
ScreenOverlay::ScreenOverlay(QPixmap pixmap, QObject *parent) : QGraphicsScene(parent), _pixmap(pixmap) {
|
||||||
|
setCursorPos(QCursor::pos());
|
||||||
addPixmap(pixmap)->setZValue(-1);
|
addPixmap(pixmap)->setZValue(-1);
|
||||||
QPolygonF cursorPoly;
|
QPolygonF cursorPoly;
|
||||||
cursorPoly << QPoint(-10, 0) //
|
cursorPoly << QPoint(-10, 0) //
|
||||||
|
@ -159,6 +160,7 @@ void ScreenOverlay::setHighlight(QColor highlight) {
|
||||||
if (gridRectsX.isEmpty() || gridRectsY.isEmpty()) return;
|
if (gridRectsX.isEmpty() || gridRectsY.isEmpty()) return;
|
||||||
gridRectsX[i]->setBrush(c);
|
gridRectsX[i]->setBrush(c);
|
||||||
gridRectsY[i]->setBrush(c);
|
gridRectsY[i]->setBrush(c);
|
||||||
|
updateMag();
|
||||||
highlightChanged(highlight);
|
highlightChanged(highlight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue