Skip to content

Commit 1a9069c

Browse files
committed
Revert "[[ Bug 17247 ]] Include dirty rect of children in dirty rect of group"
This reverts commit 4d94321.
1 parent 9c21918 commit 1a9069c

4 files changed

Lines changed: 6 additions & 27 deletions

File tree

docs/notes/bugfix-17247.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

engine/src/group.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3101,22 +3101,3 @@ void MCGroup::scheduledelete(bool p_is_child)
31013101
while(t_control != controls);
31023102
}
31033103
}
3104-
3105-
MCRectangle MCGroup::geteffectiverect(void) const
3106-
{
3107-
MCRectangle t_rect;
3108-
t_rect = MCControl::geteffectiverect();
3109-
3110-
if (controls != NULL)
3111-
{
3112-
MCControl *t_control;
3113-
t_control = controls;
3114-
do
3115-
{ t_rect = MCU_union_rect(t_rect, t_control -> geteffectiverect());
3116-
t_control = t_control -> next();
3117-
}
3118-
while(t_control != controls);
3119-
}
3120-
3121-
return t_rect;
3122-
}

engine/src/group.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,6 @@ class MCGroup : public MCControl
148148

149149
virtual bool isdeletable(bool p_check_flag);
150150

151-
// This call computes the pixel bounds of the group, rather than
152-
// just its active bounds - transients, bitmap effects and selection
153-
// handles of a group's children may extend beyond the group's bounds.
154-
virtual MCRectangle geteffectiverect(void) const;
155-
156151
void drawselectedchildren(MCDC *dc);
157152
bool updatechildselectedrect(MCRectangle& x_rect);
158153

engine/src/redraw.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,8 +555,12 @@ void MCControl::layer_dirtyeffectiverect(const MCRectangle& p_effective_rect, bo
555555
return;
556556
}
557557

558-
// Otherwise intersect the dirty rect with the parent's effective rect.
559-
t_dirty_rect = MCU_intersect_rect(t_dirty_rect, t_parent_control -> geteffectiverect());
558+
// Otherwise intersect the dirty rect with the parent's rect.
559+
t_dirty_rect = MCU_intersect_rect(t_dirty_rect, t_control -> parent -> getrect());
560+
561+
// Expand due to bitmap effects (if any).
562+
if (t_parent_control -> m_bitmap_effects != nil)
563+
MCBitmapEffectsComputeBounds(t_parent_control -> m_bitmap_effects, t_dirty_rect, t_dirty_rect);
560564

561565
t_control = t_parent_control;
562566
}

0 commit comments

Comments
 (0)