Bug 121598 - Slides deleted if slide dragged from the pane
Summary: Slides deleted if slide dragged from the pane
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
6.0.6.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-21 16:41 UTC by tk
Modified: 2018-11-22 16:19 UTC (History)
1 user (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 tk 2018-11-21 16:41:58 UTC
Description:
I noticed this problem after an update. Basically, if I click a slide (A) in the slide pane and drag it in-between two slides (B-C), the slide is supposed to be moved between them, i.e. the final order is B-A-C. This probably happens by a mechanism that makes a copy of the slide A between B and C, and then deletes the original A from the original position.

But if one clicks on slide A, and not drag it to anywhere, slide A is deleted. This happens with the slightest up-down movement of the mouse during the selection, which is something that a typical user always does to a certain extent.

What seems to happen in the background is that if the user does not drag the slide sufficiently far away, then B=A, the slide A is tried to be inserted between A and C, rather than B & C. The slide is deleted from its previous location, without making a copy at its original position, causing loss of data.

Actual Results:
Make a presentation with 2 slides.
On the slide pane (left), drag second slide downwards
Slide 2 will disappear

Expected Results:
Make a presentation with 2 slides.
On the slide pane (left), drag second slide downwards
Slide 2 does not move anywhere.


Reproducible: Always


User Profile Reset: No



Additional Info:
I think something like this should be added:

if (the move-to-location == move-from-location)
>>>do nothing
else
>>>make a copy at the move-to-location
>>>remove the copy at the move-from-location
end
Comment 1 Xisco Faulí 2018-11-21 18:21:28 UTC
Thank you for reporting the bug.
Could you please try to reproduce it with the latest version of LibreOffice
from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the bug is still present in the latest version.
Comment 2 tk 2018-11-21 20:32:26 UTC
I installed the fresh version that Xisco requested me to. The slide deletion problem I mentioned seems to be solved. Thank you very much for this suggestion.

However, I have two minor issues with the slide pane. Though not a very important problem at all, maybe it is worth bringing to your attention.

1) When I try the same dragging action as before, nothing gets deleted. The slide first becomes white and then after about 100-200ms, it re-appears at the original spot. I suggest trying this with a slide involving very very large images.

Given that it depends on the size of the contents, I have a feeling that the code is actually cutting and pasting back to the same location rather than just doing nothing because the nonsense action is caught by an if-else.


2) If I select and drag a slide towards right, it gets duplicated. I observe that this is an intentional functionality, but still I found it somewhat annoying.
Comment 3 Xisco Faulí 2018-11-22 16:19:28 UTC
Thanks for retesting with the latest version.
Setting to RESOLVED WORKSFORME as the commit fixing this issue hasn't been identified.

I've reported the problem you're mentioning in bug 121627. Thank you