14.5: one View › Snap for all snapping

This commit is contained in:
ZacharyZhang-NY committed 2026-10-11 04:24:36 -04:00
1 parent dea7346a7c
commit 1289a6c790
14 files changed
+33 -43

No files matched your search

+2 -2
View File
@@ -171,10 +171,10 @@ void ResizeSnapTests::aTieTakesTheLowEdge()
void ResizeSnapTests::snappingOffOrAnotherDragLeavesThePoint()
{
Resized resized;
resized.session.setSnappingEnabled(false);
resized.session.setSnapEnabled(false);
const LayerTransform result = resized.resize(3, QPointF(110, 60), QPointF(147, 60), false);
QCOMPARE(result.origin.x() + result.size.width(), 147.0);
resized.session.setSnappingEnabled(true);
resized.session.setSnapEnabled(true);
const TransformDrag move{layerWith(resized.session, resized.layer).transform, QPointF(110, 60), {TransformDrag::Kind::move, 3}, std::nullopt};
QCOMPARE(resized.session.snappedResizePoint(QPointF(147, 60), move, false, {resized.layer}, 5, [&](QPointF to) { return move.updated(to, false, false); }),
QPointF(147, 60));