Commit 26db43e9 authored by Dmitry Kazakov's avatar Dmitry Kazakov

Fix KisFilterWeightsApplicator::unite()

Empty region should be really empty and not to drag from 0 coordinate.
parent 0217622b
......@@ -179,11 +179,16 @@ public:
}
inline void unite(const LinePos &rhs) {
int newStart = qMin(start(), rhs.start());
int newEnd = qMax(end(), rhs.end());
m_start = newStart;
m_size = newEnd - newStart;
if (m_size > 0) {
int newStart = qMin(start(), rhs.start());
int newEnd = qMax(end(), rhs.end());
m_start = newStart;
m_size = newEnd - newStart;
} else {
m_start = rhs.start();
m_size = rhs.size();
}
}
private:
......
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