Skip to content

LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust

#1290: presets dropped with no library open are refused, not lost

francoisgnda434b05983d
diff --git a/crates/ui-egui/locales/fr.json b/crates/ui-egui/locales/fr.json
index 33365533c..b4fadd741 100644
--- a/crates/ui-egui/locales/fr.json
+++ b/crates/ui-egui/locales/fr.json
@@ -2362,5 +2362,6 @@
"Not answering yet: the drive may be asleep or offline": "Pas encore de réponse : le disque est peut-être en veille ou hors ligne",
"This library couldn't be checked": "Impossible de vérifier cette bibliothèque",
"Checking recent libraries": "Vérification des bibliothèques récentes",
- "The photos are imported once a library is open": "Les photos seront importées dès qu'une bibliothèque sera ouverte"
+ "The photos are imported once a library is open": "Les photos seront importées dès qu'une bibliothèque sera ouverte",
+ "Open a library first, then drop the presets again": "Ouvrez d'abord une bibliothèque, puis déposez à nouveau les préréglages"
}
diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs
index 634771214..82ee5d3f8 100644
--- a/crates/ui-egui/src/lib.rs
+++ b/crates/ui-egui/src/lib.rs
@@ -1256,7 +1256,12 @@ impl LightcraftApp {
}
let (presets, photos) = split_presets(dropped);
if !presets.is_empty() {
- let _ = self.run("file.importPresets", serde_json::json!({"paths": presets}));
+ // presets live in a library: with none open they would go with the session it replaces
+ if panels::library_problem::holds_drops(self) {
+ self.toast(ctx, crate::i18n::tr("Open a library first, then drop the presets again"));
+ } else {
+ let _ = self.run("file.importPresets", serde_json::json!({"paths": presets}));
+ }
}
// read and added on a worker thread (dropped folders can be large, or on a slow drive)
let photos = panels::library_problem::hold_dropped(self, ctx, photos).unwrap_or_default();
diff --git a/docs/control-protocol.md b/docs/control-protocol.md
index ac949a549..f2e84ed87 100644
--- a/docs/control-protocol.md
+++ b/docs/control-protocol.md
@@ -167,7 +167,8 @@ are `button:libraryRetry`, `button:libraryChoose`, `button:libraryTemporary` (Co
`button:libraryQuit`. A temporary session shows a banner (`indicator:temporarySession`, `button:libraryReopen`) and
writes nothing. `app.openLibrary` opening a library ends it. `pendingImport` counts the files waiting for a
library: those given on the command line, and photos dropped on the window while it (or the launch list below) is
-up; they are imported into the library that opens, or into the temporary session.
+up (desktop app); they are imported into the library that opens, or into the temporary session. Presets dropped
+then are refused with a toast.
### Choosing the library at launch
diff --git a/docs/parity-checklist.md b/docs/parity-checklist.md
index 4369d7413..9bcd04286 100644
--- a/docs/parity-checklist.md
+++ b/docs/parity-checklist.md
@@ -798,7 +798,7 @@ Latin stays upright. Advanced Japanese composition remains open. Regression cove
| Date | Change | Summary |
|---|---|---|
-| 2026-10-23 | minor | LRC-LIB-CATALOG-SWITCH, LR-PREF-GENERAL: Settings ▸ General ▸ At launch (Open the last library / Ask me) with a launch window listing the recent libraries, Alt/Option at launch asks once, File ▸ Open Recent Library ▸ Remove from List and `app.recentLibraries {remove}` (issue #1290); status and counts unchanged (✅) |
+| 2026-10-23 | minor | LRC-LIB-CATALOG-SWITCH, LR-PREF-GENERAL: Settings ▸ General ▸ At launch (Open the last library / Ask me) with a launch window listing the recent libraries, Alt/Option at launch asks once, File ▸ Open Recent Library ▸ Remove from List and `app.recentLibraries {remove}` (issue #1290); photos dropped while no library is open wait for the one opened (presets are refused then); status and counts unchanged (✅) |
| 2026-10-21 | patch | LR-IMP-ADD-DIALOG: reconcile #2362 with current main; deleted-album guard and hierarchical picker retained; counts unchanged |
| 2026-10-20 | minor | LR-IMP-ADD-DIALOG: #2362 gives the import review the shared hierarchy/search album picker while retaining None/New album and existing destination IDs; status and feature counts unchanged |
| 2026-10-21 | patch | KEY-SLIDER-NUDGE: vertical wheel nudges need a click or drag in the slider's row; leaving it (even between two frames) or Tab focus alone does not arm them (issue #1355); status unchanged |
diff --git a/docs/whats-new.md b/docs/whats-new.md
index 68d92e110..c84beaf0c 100644
--- a/docs/whats-new.md
+++ b/docs/whats-new.md
@@ -20,6 +20,9 @@
- File ▸ Open Recent Library ▸ **Remove from List** forgets one library, and the launch window's **Remove from
List** does the same. Only the entry goes: the library and its photos stay where they are. Agents use
`app.recentLibraries {remove: path}`; its list now also says when each library was last opened (`lastOpened`).
+- Photos dropped on the window while the list (or the window of a library that couldn't open) is up wait for the
+ library you open and are imported into it, as files given on the command line are; presets dropped then are
+ refused with a note, since they belong to a library.
## 2026-10-21