r24168 by jghali - #16304: Line selection hitboxes extend "above" the line after loading a document
scribus-commit
scribus-commit at lists.scribus.net
Wed Nov 4 00:00:11 UTC 2020
Author: jghali
Date: Wed Nov 4 00:00:11 2020
New Revision: 24168
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24168
Log:
#16304: Line selection hitboxes extend "above" the line after loading a document
Modified:
trunk/Scribus/scribus/pageitem_line.cpp
Modified: trunk/Scribus/scribus/pageitem_line.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24168&path=/trunk/Scribus/scribus/pageitem_line.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_line.cpp (original)
+++ trunk/Scribus/scribus/pageitem_line.cpp Wed Nov 4 00:00:11 2020
@@ -176,11 +176,13 @@
void PageItem_Line::setLineClip()
{
+ // Big fat warning : QPolygon::setPoints is a variadic function,
+ // only pass ints as arguments, or expect strange results
int ph = static_cast<int>(qMax(1.0, this->visualLineWidth() / 2.0));
- Clip.setPoints(4, -1.0, -ph,
+ Clip.setPoints(4, -1, -ph,
static_cast<int>(width() + 1.0), -ph,
static_cast<int>(width() + 1.0), ph,
- -1.0, ph);
+ -1, ph);
}
void PageItem_Line::getBoundingRect(double *x1, double *y1, double *x2, double *y2) const
More information about the scribus-commit
mailing list