Commit 60e3951a authored by Yimgo's avatar Yimgo

Tool widget position fixed.

parent 28bd9567
......@@ -2048,7 +2048,7 @@ void UBBoardController::moveGraphicsWidgetToControlView(UBGraphicsWidgetItem* gr
mActiveScene->addItem(toolWidget);
qreal ssf = 1 / UBApplication::boardController->systemScaleFactor();
toolWidget->scale(ssf, ssf);
toolWidget->setScale(ssf);
toolWidget->setPos(graphicsWidget->scenePos());
}
......
......@@ -134,7 +134,7 @@ void UBToolWidget::setPos(const QPointF &point)
void UBToolWidget::setPos(qreal x, qreal y)
{
QGraphicsItem::setPos((x - mContentMargin)*scale(), (y - mContentMargin)*scale());
QGraphicsItem::setPos(x - mContentMargin * scale(), y - mContentMargin * scale());
}
void UBToolWidget::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment