Skip to content

Commit

Permalink
Do nothing if last active ix is same.
Browse files Browse the repository at this point in the history
  • Loading branch information
huacnlee committed Dec 19, 2024
1 parent 6c3b466 commit b281282
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/ui/src/dock/tab_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ impl TabPanel {
}

fn set_active_ix(&mut self, ix: usize, cx: &mut ViewContext<Self>) {
if ix == self.active_ix {
return;
}

let last_active_ix = self.active_ix;

self.active_ix = ix;
Expand Down

0 comments on commit b281282

Please sign in to comment.