mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-25 18:27:02 -06:00
Tabs: Clear All Tabs reports a failure in the status bar
This commit is contained in:
@@ -258,8 +258,10 @@ pub fn menu(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
if sel >= stops.len() {
|
||||
sel = stops.len().saturating_sub(1);
|
||||
}
|
||||
if menu_item(ui, tl!("Clear All Tabs"), !stops.is_empty(), false) {
|
||||
super::paragraph::run_on_paragraphs(app, "text.tabs.clear", json!({})).ok();
|
||||
if menu_item(ui, tl!("Clear All Tabs"), !stops.is_empty(), false)
|
||||
&& let Err(e) = super::paragraph::run_on_paragraphs(app, "text.tabs.clear", json!({}))
|
||||
{
|
||||
app.status(e);
|
||||
}
|
||||
if menu_item(ui, tl!("Delete Tab"), sel < stops.len(), false) {
|
||||
stops.remove(sel);
|
||||
|
||||
Reference in New Issue
Block a user