13.19e: 70318de verified; the Smear's allocation guards starved in WarpFailureTests; the commit's thinning and the bar's deferred finish pinned
This commit is contained in:
1 parent
3757eb8910
commit
1de10e711c
7 files changed
+142
-7
No files matched your search
@@ -8,6 +8,7 @@ class MoveBarPressTests : public QObject {
|
||||
private slots:
|
||||
void aTypedValueThenAPressDragsTheActiveLayer();
|
||||
void ctrlKeepsAFolderAsAutoSelectPicksElsewhere();
|
||||
void aValueLeftByMouseForAnotherFieldApplies();
|
||||
};
|
||||
|
||||
// Swift picks before focus moves: the active layer drags.
|
||||
@@ -69,5 +70,33 @@ void MoveBarPressTests::ctrlKeepsAFolderAsAutoSelectPicksElsewhere()
|
||||
QCOMPARE(session.activeLayerID(), std::optional(blue));
|
||||
}
|
||||
|
||||
// No canvas press: the deferred finish alone applies the value.
|
||||
void MoveBarPressTests::aValueLeftByMouseForAnotherFieldApplies()
|
||||
{
|
||||
Canvas shown;
|
||||
EditorSession &session = shown.session;
|
||||
// Wide enough that Y shows beside X.
|
||||
shown.window.resize(1000, 350);
|
||||
TransformInspector bar(session, &shown.window);
|
||||
bar.setGeometry(0, 300, 1000, 42);
|
||||
bar.show();
|
||||
QLineEdit *x = bar.findChild<QLineEdit *>(QStringLiteral("transformX"));
|
||||
QLineEdit *y = bar.findChild<QLineEdit *>(QStringLiteral("transformY"));
|
||||
QVERIFY(x && y);
|
||||
x->setFocus();
|
||||
QTRY_VERIFY(x->hasFocus());
|
||||
x->selectAll();
|
||||
QTest::keyClicks(x, "12");
|
||||
QVERIFY(session.transformEdit().value().fromFields);
|
||||
const int steps = session.history.undoCount();
|
||||
QWindow *window = shown.window.windowHandle();
|
||||
const QPoint inY = y->mapTo(&shown.window, y->rect().center());
|
||||
QTest::mouseClick(window, Qt::LeftButton, Qt::NoModifier, inY);
|
||||
QTRY_VERIFY(y->hasFocus());
|
||||
QTRY_VERIFY(!session.transformEdit().has_value());
|
||||
QCOMPARE(shown.origin(), QPointF(12, 100));
|
||||
QCOMPARE(session.history.undoCount(), steps + 1);
|
||||
}
|
||||
|
||||
QTEST_MAIN(MoveBarPressTests)
|
||||
#include "MoveBarPressTests.moc"
|
||||
Reference in new issue
Block a user