Replace assert with a warning and early return

A warning will still abort the unit-tests, so it's fine
This commit is contained in:
Sergio Martins
2020-01-22 22:53:01 +00:00
parent 0003b508d6
commit da3917ae64

View File

@@ -492,8 +492,10 @@ static Anchor::List removeSmallestPath(QVector<Anchor::List> &paths)
void MultiSplitterLayout::propagateResize(int delta, Anchor *fromAnchor, Anchor::Side direction)
{
Q_ASSERT(delta >= 0);
if (delta == 0 || fromAnchor->isStatic())
if (delta < 0)
qWarning() << Q_FUNC_INFO << "Invalid delta" << delta << fromAnchor << direction;
if (delta <= 0 || fromAnchor->isStatic())
return;
QVector<Anchor::List> paths;