Skip to content

Commit

Permalink
fix: disallow deleting the only splitter
Browse files Browse the repository at this point in the history
  • Loading branch information
al2me6 committed May 17, 2023
1 parent 37e4491 commit bb89555
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ impl Protonolysis {
self.swap_splitter(i, i + 1);
}
// U+2717 BALLOT X.
if button(true, "\u{2717}", "Delete") {
if button(self.peak.splitters.len() > 1, "\u{2717}", "Delete") {
self.remove_splitter(i);
}
});
Expand Down

0 comments on commit bb89555

Please sign in to comment.