Compare commits
No commits in common. "dc7a793d3ab230a1c1b4925044aaa18d12e732bb" and "72f0f78e644a783aa8096a479a25804c8d37e936" have entirely different histories.
dc7a793d3a
...
72f0f78e64
|
@ -87,11 +87,13 @@ void PreviewWindow::mouseMoveEvent(QMouseEvent* event)
|
||||||
currentLayer->property.offset.setX(currentLayer->property.offset.x() + dx);
|
currentLayer->property.offset.setX(currentLayer->property.offset.x() + dx);
|
||||||
currentLayer->property.offset.setY(currentLayer->property.offset.y() + dy);
|
currentLayer->property.offset.setY(currentLayer->property.offset.y() + dy);
|
||||||
qDebug() << dx << "----" << dy;
|
qDebug() << dx << "----" << dy;
|
||||||
|
emit layerInfoChanged();
|
||||||
}
|
}
|
||||||
else if (event->buttons() & Qt::RightButton) {
|
else if (event->buttons() & Qt::RightButton) {
|
||||||
// 如果按下的是右键,那么旋转图形
|
// 如果按下的是右键,那么旋转图形
|
||||||
qreal angle = -sqrt(dx * dx + dy * dy) / 1.0;
|
qreal angle = -sqrt(dx * dx + dy * dy) / 1.0;
|
||||||
currentLayer->property.rotation += angle;
|
currentLayer->property.rotation += angle;
|
||||||
|
emit layerInfoChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 更新上一次的位置
|
// 更新上一次的位置
|
||||||
|
@ -101,5 +103,5 @@ void PreviewWindow::mouseMoveEvent(QMouseEvent* event)
|
||||||
|
|
||||||
void PreviewWindow::mouseReleaseEvent(QMouseEvent* event)
|
void PreviewWindow::mouseReleaseEvent(QMouseEvent* event)
|
||||||
{
|
{
|
||||||
emit layerInfoChanged();
|
// 当鼠标释放时,不做任何操作
|
||||||
}
|
}
|
Loading…
Reference in New Issue