Bug 168481 - Drag and drop an image (to change it) moves the image above other objects
Summary: Drag and drop an image (to change it) moves the image above other objects
Status: NEEDINFO
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
25.8.1.1 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-19 14:38 UTC by Szasz-Fabian Jozsef
Modified: 2026-01-21 14:31 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Szasz-Fabian Jozsef 2025-09-19 14:38:44 UTC
Description:
Having an image in Impress, it is moved to the bottom of the object stack (behind all other objects). When drag/drop from an external software, the image moves above all other objects.

Steps to Reproduce:
1. Place an image in Impress
2. Place another image in Impress
3. Drag an image over the first image

Actual Results:
The 1st image is automatically movet above all other objects

Expected Results:
Leave the image z-position, do not move to the top.


Reproducible: Always


User Profile Reset: No

Additional Info:
[Information automatically included from LibreOffice]
Locale: en-US
Module: PresentationDocument
[Information guessed from browser]
OS: Windows (All)
OS is 64bit: no
Comment 1 raal 2025-09-27 07:34:13 UTC
No repro with Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 8ea8e254a3151f5390f3a10ff156fcaf8e7c5d5c
CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded

Following your steps the second image is above the first.

Also tested: I've inserted two images in the Impress. Set one of them as Right click/Arrange/Behind the object. Then I moved the image over the second one. The image is behind the second one.
Comment 2 Regina Henschel 2025-09-27 12:55:11 UTC
(In reply to Szasz-Fabian Jozsef from comment #0)
> ... from an external software ...

When it comes from an external software, it has no z-order information. In that case I consider it correct, that it is placed in front of all. Otherwise it might be, that you cannot easily access it to determine the desired z-order.
Comment 3 Szasz-Fabian Jozsef 2025-09-27 23:01:51 UTC
Reply to Regina Henschel:

The fact "external software" doesn't matters IMHO. Please focus on "replacing the image". When replacing the image, we expect a "content change", maybe size/aspect ratio (another topic), but z-index and the other properties must be retained - since we only changed the "source".
Therefore: regardless of the method of replacing the image (here we have the case of drag/drop from external source), the original z-position must be retained. As a programmer I think, the code a) removes the original source and b) inserts a new object when replacing, the new object being defaulted to the next available z-index, the top of all. A slightly much more code will solve the original expectation?: replacing the object should keep the container and should replace only the source?
Comment 4 Buovjaga 2026-01-21 14:31:28 UTC
(In reply to Szasz-Fabian Jozsef from comment #3)
> Reply to Regina Henschel:
> 
> The fact "external software" doesn't matters IMHO. Please focus on
> "replacing the image". When replacing the image, we expect a "content
> change", maybe size/aspect ratio (another topic), but z-index and the other
> properties must be retained - since we only changed the "source".
> Therefore: regardless of the method of replacing the image (here we have the
> case of drag/drop from external source), the original z-position must be
> retained. As a programmer I think, the code a) removes the original source
> and b) inserts a new object when replacing, the new object being defaulted
> to the next available z-index, the top of all. A slightly much more code
> will solve the original expectation?: replacing the object should keep the
> container and should replace only the source?

I don't understand what you mean by replacing in this context. What you described is not related to replacing, which would be done by right-clicking an image and selecting Replace from the context menu. Dragging images in the canvas will do no replacements. A screen recording would be helpful for us to understand what you are doing.