Use a new Workspace::activate_item
API in project diagnostics
Previously, we would only activate the pane without switching the pane's *active item*.
This commit is contained in:
parent
f933d54469
commit
1a53d5b7ba
3 changed files with 25 additions and 4 deletions
|
@ -167,7 +167,7 @@ impl ProjectDiagnosticsEditor {
|
|||
|
||||
fn deploy(workspace: &mut Workspace, _: &Deploy, cx: &mut ViewContext<Workspace>) {
|
||||
if let Some(existing) = workspace.item_of_type::<ProjectDiagnostics>(cx) {
|
||||
workspace.activate_pane_for_item(&existing, cx);
|
||||
workspace.activate_item(&existing, cx);
|
||||
} else {
|
||||
let diagnostics =
|
||||
cx.add_model(|_| ProjectDiagnostics::new(workspace.project().clone()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue