mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +00:00
LibGUI: Don't try to paint items in model-less IconView :^)
Fixes #6079.
This commit is contained in:
parent
f1ea092d8f
commit
64d4921f35
1 changed files with 3 additions and 0 deletions
|
@ -515,6 +515,9 @@ void IconView::paint_event(PaintEvent& event)
|
|||
|
||||
painter.fill_rect(event.rect(), fill_with_background_color() ? widget_background_color : Color::Transparent);
|
||||
|
||||
if (!model())
|
||||
return;
|
||||
|
||||
painter.translate(frame_thickness(), frame_thickness());
|
||||
painter.translate(-horizontal_scrollbar().value(), -vertical_scrollbar().value());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue