Commit 36ac9600 authored by Volker Krause's avatar Volker Krause

Don't block merging on unknown line modes

parent c0c2f00b
......@@ -123,7 +123,7 @@ void Line::setModeString(const QString &modeString)
bool Line::isSame(const Line &lhs, const Line &rhs)
{
return isSameLineName(lhs.name(), rhs.name()) && lhs.mode() == rhs.mode();
return isSameLineName(lhs.name(), rhs.name()) && (lhs.mode() == rhs.mode() || lhs.mode() == Unknown || rhs.mode() == Unknown);
}
Line Line::merge(const Line &lhs, const Line &rhs)
......@@ -135,6 +135,9 @@ Line Line::merge(const Line &lhs, const Line &rhs)
if (!l.textColor().isValid() && rhs.textColor().isValid()) {
l.setTextColor(rhs.textColor());
}
if (l.mode() == Unknown) {
l.setMode(rhs.mode());
}
return l;
}
......
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