Merge branch 'port-d'

# Conflicts:
#	AGENTS.md
This commit is contained in:
ZacharyZhang-NY committed 2026-10-01 23:02:47 -04:00
commit 8204e6a28b
14 files changed
+231 -101

No files matched your search

+6 -1
View File
@@ -6,6 +6,7 @@
#include <QEvent>
#include <QKeyEvent>
#include <QLabel>
#include <QTimer>
#include <cmath>
TransformValueField::TransformValueField(const QString &label, const QString &suffix, double low, double high, EditorSession &session,
@@ -68,7 +69,11 @@ bool TransformValueField::eventFilter(QObject *watched, QEvent *event)
// Another window in front keeps the field, as AppKit does.
m_borrowed = reason == Qt::MenuBarFocusReason || reason == Qt::PopupFocusReason || reason == Qt::ActiveWindowFocusReason;
if (!m_borrowed) {
m_finish();
// Swift's focus changes after the canvas's mouseDown: it picks first.
if (reason == Qt::MouseFocusReason)
QTimer::singleShot(0, this, [this] { m_finish(); });
else
m_finish();
field->setText(formatted(m_value));
}
}