Skip to content

Commit

Permalink
interpreter: Fix wrong parent item tree of the PopupWindow (#6448)
Browse files Browse the repository at this point in the history
When calling `popup.show()` the parent itemtree of the popup should be
the one from the parent in which the PopupWindow is declared in the
source, and not the one of the context in which the `popup.show()` code
appears.

Part of issue #6426.
This happens to fix the issue as presented there.

But there is another issue in which we still crash when trying to access
global from a popup who's parent has been deleted because the interpreter 
needs access to the root item tree to access the globals
  • Loading branch information
ogoffart authored and NigelBreslaw committed Oct 15, 2024
1 parent 31e1a0a commit 37ad887
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/interpreter/eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ fn call_builtin_function(
)
},
popup.close_on_click,
component.self_weak().get().unwrap().clone(),
enclosing_component.self_weak().get().unwrap().clone(),
component.window_adapter(),
&parent_item,
);
Expand Down

0 comments on commit 37ad887

Please sign in to comment.