Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 1b8c9dc

Browse files
committed
[[ Bug 23098 ]] Fix native layers not relayering after object relayer
This patch fixes an issue where native layers do not relayer after the relayer command should change the native layer hierarchy.
1 parent 076b45e commit 1b8c9dc

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

docs/notes/bugfix-23098.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Native layers now relayer correctly in response to the relayer command

engine/src/card.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1633,6 +1633,8 @@ void MCCard::relayercontrol(MCControl *p_source, MCControl *p_target)
16331633
else
16341634
t_source_ptr -> appendto(objptrs);
16351635
layer_added(p_source, MCControlPreviousByLayer(p_source), MCControlNextByLayer(p_source));
1636+
1637+
p_source->layerchanged();
16361638
}
16371639

16381640
void MCCard::relayercontrol_remove(MCControl *p_control)
@@ -1688,6 +1690,8 @@ void MCCard::relayercontrol_insert(MCControl *p_control, MCControl *p_target)
16881690
else
16891691
t_control_ptr -> appendto(objptrs);
16901692
layer_added(p_control, MCControlPreviousByLayer(p_control), MCControlNextByLayer(p_control));
1693+
1694+
p_control->layerchanged();
16911695
}
16921696

16931697
Exec_stat MCCard::relayer(MCControl *optr, uint2 newlayer)

engine/src/group.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3069,6 +3069,8 @@ void MCGroup::relayercontrol(MCControl *p_source, MCControl *p_target)
30693069

30703070
if (!computeminrect(False))
30713071
p_source -> layer_redrawall();
3072+
3073+
p_source->layerchanged();
30723074
}
30733075

30743076
void MCGroup::relayercontrol_remove(MCControl *p_control)
@@ -3096,6 +3098,8 @@ void MCGroup::relayercontrol_insert(MCControl *p_control, MCControl *p_target)
30963098

30973099
if (!computeminrect(False))
30983100
p_control -> layer_redrawall();
3101+
3102+
p_control->layerchanged();
30993103
}
31003104

31013105
bool MCGroup::getNativeContainerLayer(MCNativeLayer *&r_layer)

0 commit comments

Comments
 (0)