Skip to content

DesignCraft: An open-source page and layout design editor written by scratch in pure Rust

Fix help buttons disabled when on homepage

Michał Kosior crqch371bd15dc572
diff --git a/crates/ui-egui/src/menus.rs b/crates/ui-egui/src/menus.rs
index 94e5c0971..202c04398 100644
--- a/crates/ui-egui/src/menus.rs
+++ b/crates/ui-egui/src/menus.rs
@@ -1778,7 +1778,7 @@ pub fn checked(app: &DesignApp, id: &str, params: &Value) -> Option<bool> {
/// Enablement for menu display (UI commands need a document unless they're app/window-level).
pub fn menu_enabled(app: &DesignApp, id: &str) -> bool {
if ui_label(id).is_some() {
- return app.session.active().is_some() || id.starts_with("app.") || id.starts_with("window.");
+ return app.session.active().is_some() || id.starts_with("app.") || id.starts_with("window.") || id.starts_with("help.");
}
enabled(app, id)
}