Adaptive Wide Angle blocks other menu commands like the other full-window workspaces

This commit is contained in:
aiongg committed 2026-10-24 21:31:56 +00:00
1 parent 3466d93204
commit 16d355def4
2 files changed
+6 -3

No files matched your search

+1 -1
View File
@@ -1590,7 +1590,7 @@ mod tests {
app.run("layer.new.layer", json!({})).unwrap();
app.run("edit.fill", json!({"color":"#808080"})).unwrap();
app.run("select.rect", json!({"x":8,"y":8,"width":8,"height":8})).unwrap();
for workspace in ["filter.liquify", "edit.contentAwareFill", "filter.filterGallery"] {
for workspace in ["filter.liquify", "edit.contentAwareFill", "filter.filterGallery", "filter.adaptiveWideAngle"] {
let opened = call(&mut app, &ctx, "ui.menu.invoke", json!({"id":workspace}));
assert_eq!(opened["ok"], true, "{workspace}: {opened}");
assert_eq!(crate::distort_ui::modal_workspace(&app), Some(workspace));
+5 -2
View File
@@ -91,8 +91,9 @@ pub(crate) fn surface_image(surf: &Surface, r: Rect, max_side: usize) -> ColorIm
ColorImage::new([tw, th], px)
}
/// The menu id of the open full-window workspace (Liquify, Content-Aware Fill, Filter Gallery).
/// Like Photoshop's, these are modal: other menu commands wait for OK or Cancel (`menus::modal_allows`).
/// The menu id of the open full-window workspace (Liquify, Content-Aware Fill, Filter Gallery,
/// Adaptive Wide Angle). These are modal: other menu commands wait for OK or Cancel
/// (`menus::modal_allows`).
pub(crate) fn modal_workspace(app: &PhotocraftApp) -> Option<&'static str> {
if app.distort.liquify.is_some() {
Some("filter.liquify")
@@ -100,6 +101,8 @@ pub(crate) fn modal_workspace(app: &PhotocraftApp) -> Option<&'static str> {
Some("edit.contentAwareFill")
} else if app.distort.gallery.is_some() {
Some("filter.filterGallery")
} else if app.wide_angle.is_some() {
Some(photocraft_engine::lens_cmds::WIDE)
} else {
None
}