From 47786865ef4ae3874ba6c26d91bdbbaedc64c6c3 Mon Sep 17 00:00:00 2001 From: Johannes Lorenz Date: Thu, 2 Jan 2020 19:49:02 +0100 Subject: [PATCH] Document strange bug --- tests/src/core/AutomatableModelTest.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/src/core/AutomatableModelTest.cpp b/tests/src/core/AutomatableModelTest.cpp index 5b1363f6c..553656f8d 100644 --- a/tests/src/core/AutomatableModelTest.cpp +++ b/tests/src/core/AutomatableModelTest.cpp @@ -61,6 +61,20 @@ private slots: // tests AutomatableModel::linkModels(&m1, &m2); QVERIFY(!m1Changed); // it's already linked QVERIFY(!m2Changed); + + resetChanged(); + BoolModel m3(false); + m1.setValue(1.f); + m2.setValue(1.f); + AutomatableModel::linkModels(&m1, &m2); + QVERIFY(m1.value()); + QVERIFY(m2.value()); + QVERIFY(!m3.value()); + AutomatableModel::linkModels(&m2, &m3); // drag m3, drop on m2 + // m2 should take m3's (0) value + // due to a bug(?), this does not happen + QVERIFY(m2.value()); + QVERIFY(!m3.value()); } } AutomatableModelTests;