[TechDraw] Use function overloadin and avoid code repeat
This commit is contained in:
committed by
WandererFan
parent
91f84184bf
commit
8b52db90c5
@@ -51,12 +51,7 @@ QGCustomRect::QGCustomRect()
|
||||
|
||||
void QGCustomRect::centerAt(QPointF centerPos)
|
||||
{
|
||||
QRectF box = boundingRect();
|
||||
double width = box.width();
|
||||
double height = box.height();
|
||||
double newX = centerPos.x() - width/2.;
|
||||
double newY = centerPos.y() - height/2.;
|
||||
setPos(newX,newY);
|
||||
centerAt(centerPos.x(), centerPos.y());
|
||||
}
|
||||
|
||||
void QGCustomRect::centerAt(double cX, double cY)
|
||||
|
||||
Reference in New Issue
Block a user