Fix active pane modifiers applying to parent pane axis if child pane is active (#25836)
Closes #25304 Release Notes: - Fixed an issue where `active_pane_modifiers` settings would be applied to a parent pane if one of it's child panes was active
This commit is contained in:
parent
7fb16977ce
commit
ec88a6886f
1 changed files with 1 additions and 8 deletions
|
@ -214,13 +214,6 @@ impl Member {
|
||||||
Member::Axis(PaneAxis::new(axis, members))
|
Member::Axis(PaneAxis::new(axis, members))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn contains(&self, needle: &Entity<Pane>) -> bool {
|
|
||||||
match self {
|
|
||||||
Member::Axis(axis) => axis.members.iter().any(|member| member.contains(needle)),
|
|
||||||
Member::Pane(pane) => pane == needle,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn first_pane(&self) -> Entity<Pane> {
|
fn first_pane(&self) -> Entity<Pane> {
|
||||||
match self {
|
match self {
|
||||||
Member::Axis(axis) => axis.members[0].first_pane(),
|
Member::Axis(axis) => axis.members[0].first_pane(),
|
||||||
|
@ -702,7 +695,7 @@ impl PaneAxis {
|
||||||
cx.entity().downgrade(),
|
cx.entity().downgrade(),
|
||||||
)
|
)
|
||||||
.children(self.members.iter().enumerate().map(|(ix, member)| {
|
.children(self.members.iter().enumerate().map(|(ix, member)| {
|
||||||
if member.contains(active_pane) {
|
if matches!(member, Member::Pane(pane) if pane == active_pane) {
|
||||||
active_pane_ix = Some(ix);
|
active_pane_ix = Some(ix);
|
||||||
}
|
}
|
||||||
member
|
member
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue