Commit ec094919 authored by Dmitry Kazakov's avatar Dmitry Kazakov

Fix a random assert in KisSelectionDecorationTest

We node hierarchy changes should always be executed in
an exclusive context.
parent 5a56847c
......@@ -137,7 +137,7 @@ public:
}
inline void recalculate(const QRect& requestedRect) {
Q_ASSERT(m_startNode);
KIS_SAFE_ASSERT_RECOVER_RETURN(m_startNode);
KisProjectionLeafSP startLeaf = m_startNode->projectionLeaf();
......@@ -166,7 +166,7 @@ public:
}
bool checksumValid() {
Q_ASSERT(m_startNode);
KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE(m_startNode, false);
return
m_nodeChecksum == calculateChecksum(m_startNode->projectionLeaf(), m_requestedRect) &&
m_graphChecksum == m_startNode->graphSequenceNumber();
......
......@@ -37,8 +37,8 @@ void KisSelectionDecorationTest::testConcurrentSelectionFetches()
kundo2_noi18n("test stroke"));
applicator.applyCommand(new KisSetEmptyGlobalSelectionCommand(image));
applicator.applyCommand(new KisDeselectGlobalSelectionCommand(image));
applicator.applyCommand(new KisSetEmptyGlobalSelectionCommand(image), KisStrokeJobData::SEQUENTIAL, KisStrokeJobData::EXCLUSIVE);
applicator.applyCommand(new KisDeselectGlobalSelectionCommand(image), KisStrokeJobData::SEQUENTIAL, KisStrokeJobData::EXCLUSIVE);
applicator.end();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment