Tool widget position fixed.

preferencesAboutTextFull
Yimgo 12 years ago
parent 28bd956726
commit 60e3951ae2
  1. 2
      src/board/UBBoardController.cpp
  2. 2
      src/gui/UBToolWidget.cpp

@ -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)

Loading…
Cancel
Save