Remove more references to 'model' in GPUI APIs (#23693)
Release Notes: - N/A
This commit is contained in:
parent
a6b1514246
commit
9cae96f82f
115 changed files with 309 additions and 311 deletions
|
@ -903,7 +903,7 @@ pub fn new_terminal_pane(
|
|||
cx: &mut Context<TerminalPanel>,
|
||||
) -> Entity<Pane> {
|
||||
let is_local = project.read(cx).is_local();
|
||||
let terminal_panel = cx.model().clone();
|
||||
let terminal_panel = cx.entity().clone();
|
||||
let pane = cx.new(|cx| {
|
||||
let mut pane = Pane::new(
|
||||
workspace.clone(),
|
||||
|
@ -923,7 +923,7 @@ pub fn new_terminal_pane(
|
|||
let split_closure_terminal_panel = terminal_panel.downgrade();
|
||||
pane.set_can_split(Some(Arc::new(move |pane, dragged_item, _window, cx| {
|
||||
if let Some(tab) = dragged_item.downcast_ref::<DraggedTab>() {
|
||||
let is_current_pane = tab.pane == cx.model();
|
||||
let is_current_pane = tab.pane == cx.entity();
|
||||
let Some(can_drag_away) = split_closure_terminal_panel
|
||||
.update(cx, |terminal_panel, _| {
|
||||
let current_panes = terminal_panel.center.panes();
|
||||
|
@ -963,7 +963,7 @@ pub fn new_terminal_pane(
|
|||
return ControlFlow::Break(());
|
||||
};
|
||||
if let Some(tab) = dropped_item.downcast_ref::<DraggedTab>() {
|
||||
let this_pane = cx.model().clone();
|
||||
let this_pane = cx.entity().clone();
|
||||
let item = if tab.pane == this_pane {
|
||||
pane.item_for_index(tab.ix)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue