Files delivered after a multi-page PDF were dropped when its Import Options opened, with a
status asking to choose them again, and choosing them again replaced the cursor. They now
wait with the PDF and carry on when it is confirmed; Cancel ends the batch, as a native
one's does.
A batch starting with a single-page PDF, or in a browser with one image before a PDF, filled
the selected frame instead of entering the place cursor. A browser delivers one Place's files
together, so several in one delivery now count as a batch. One file alone still fills the frame.
They were left behind in place_paths when the PDF's Import Options opened, so the
PDF was placed alone and the rest of what was chosen never loaded. They now wait in
the dialog and carry on when it is confirmed; Cancel ends the batch.
Appending only checked each batch against the cap, and a single image or a PDF
added with append wasn't checked at all, so repeated appends could grow the
cursor without limit. Refused before decoding a batch or adding an asset.
Confirming the PDF's Import Options placed it without append, so in a batch such as [a.png, b.png, multi.pdf] it replaced the images already in the cursor. The dialog now carries append, on both the native and the delivered-file paths. A single multi-page PDF still replaces what the cursor holds.
Review fix for #2309: set_active, add_document and close_document emptied the place cursor but
kept the placeGun tool, so the next canvas click failed with 'nothing loaded in the place
cursor'. One helper, Session::unload_place_cursor, empties the cursor and its queue and goes back
to the Selection tool when the place cursor's tool is active; validate_place_cursor uses it too.
Test: changing_documents_unloads_the_place_cursor_and_its_tool.
The place cursor's grid preview fell back to the raw drag rectangle when the
cells had no positive size, while the release still sent `place.grid`, which
rejected the area. Both now use the same cell calculation (`grid_cells`), and
a grid with no room for its cells shows and places the single proportional
frame of an ordinary drag.
Split out of #2073. Port of #1307, #1392 (grid) and #1432 (thumbnail and count).
- File › Place takes several files; images load the place cursor in the
order chosen (`place.load` `files`, `append`), after the ones it holds.
A multi-page PDF or an alert stops the batch, and a file that can't be
placed returns its error to `app.placeDialog`.
- Each click places the next image; arrow keys while dragging lay out a
grid (`place.grid`) and are handled even at a limit; Escape unloads the
rest (`place.cancel`). Undo of a loaded image's asset cancels the queue.
- The cursor shows how many images are loaded.
- On the web, Place picks several files and the inbox loads consecutive
images for the same document as one batch.