GWidget: On second thought, don't assert on negative sizes in rects

Just neutralize incoming negative-size rects in set_relative_rect().
This commit is contained in:
Andreas Kling 2019-10-23 20:50:01 +02:00
commit 41289e652f
Notes: sideshowbarker 2024-07-19 11:34:09 +09:00

View file

@ -42,9 +42,9 @@ void GWidget::child_event(CChildEvent& event)
return CObject::child_event(event);
}
void GWidget::set_relative_rect(const Rect& rect)
void GWidget::set_relative_rect(const Rect& a_rect)
{
ASSERT(rect.width() >= 0 && rect.height() >= 0);
Rect rect = a_rect.is_empty() ? Rect() : a_rect;
if (rect == m_relative_rect)
return;