Clicked text on its baseline, live text on the Move tool's double click, SVG import (12.11c)

This commit is contained in:
雷电芽衣 committed 2026-09-29 10:55:10 -04:00
1 parent 008493b0a3
commit 8fbb104c48
34 files changed
+572 -47

No files matched your search

+10 -2
View File
@@ -113,6 +113,12 @@ void CanvasView::wheelEvent(QWheelEvent *event)
}
void CanvasView::mousePressEvent(QMouseEvent *event)
{
press(event, 1);
}
// Swift's mouseDown with its click count.
void CanvasView::press(QMouseEvent *event, int clicks)
{
// The middle button pans in any tool, beside the left.
if (event->button() == Qt::MiddleButton && m_session.document()) {
@@ -156,6 +162,8 @@ void CanvasView::mousePressEvent(QMouseEvent *event)
m_lastDragPoint = point;
updateCursor();
} else if (m_session.tool() == NavigationTool::move) {
if (clicks >= 2 && beginLiveTextEdit(point))
return;
if (!beginGuideDrag(point))
beginTransformDrag(point, event->modifiers());
} else if (isSelectionTool(m_session.tool())) {
@@ -199,8 +207,8 @@ void CanvasView::mouseDoubleClickEvent(QMouseEvent *event)
updateCursor();
return;
}
// Else, picking included, it is a press, as Swift's mouseDown.
QWidget::mouseDoubleClickEvent(event);
// Else, picking included, it is Swift's second mouseDown.
press(event, 2);
}
void CanvasView::mouseMoveEvent(QMouseEvent *event)