Commit 394cff78 authored by Tusooa Zhu's avatar Tusooa Zhu

Delete node in GUI thread for the stroke

We still cannot delete nodes in image thread as it has problems
with the timer.
parent 2a36b1da
......@@ -150,6 +150,14 @@ KisNodeReplaceBasedStrokeStrategy::KisNodeReplaceBasedStrokeStrategy(const KisNo
KisNodeReplaceBasedStrokeStrategy::~KisNodeReplaceBasedStrokeStrategy()
{
if (! m_d->nodeChanged) {
// HACK: delete the node in the gui thread
KisNode *node = m_d->originalState.data();
node->ref();
m_d->originalState.clear();
node->deref();
node->deleteLater();
}
}
void KisNodeReplaceBasedStrokeStrategy::initStrokeCallback()
......
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