mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-03 06:31:42 +01:00
cargo fmt
This commit is contained in:
1 parent
b2a033ca02
commit
f2749d5242
1 file changed
+10
-2
@@ -357,8 +357,16 @@ pub fn drop_floating(s: &mut Session) -> Result<Value> {
|
||||
|
||||
/// Commands that leave a floating piece floating: its own, and ones that don't touch documents.
|
||||
fn keeps_floating(id: &str) -> bool {
|
||||
matches!(id, "select.float" | "select.drop" | "file.export.saveForWebLegacy" | "layer.copyToDocument" | "brush.mixer.sample" | "brush.mixer.load" | "brush.mixer.clean")
|
||||
|| ["view.", "window.", "help.", "prefs."].iter().any(|p| id.starts_with(p))
|
||||
matches!(
|
||||
id,
|
||||
"select.float"
|
||||
| "select.drop"
|
||||
| "file.export.saveForWebLegacy"
|
||||
| "layer.copyToDocument"
|
||||
| "brush.mixer.sample"
|
||||
| "brush.mixer.load"
|
||||
| "brush.mixer.clean"
|
||||
) || ["view.", "window.", "help.", "prefs."].iter().any(|p| id.starts_with(p))
|
||||
}
|
||||
|
||||
/// Before any command (`Session::dispatch`): Undo puts a floating piece back (and is used up:
|
||||
|
||||
Reference in new issue
Block a user