Bug 137839 - Objects disappear after undo followed by Enter (caused by invisible anchor selection; comment 2)
Summary: Objects disappear after undo followed by Enter (caused by invisible anchor se...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.6.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:24.8.0
Keywords: bibisected, bisected
Depends on:
Blocks: Undo-Redo Selection
  Show dependency treegraph
 
Reported: 2020-10-28 19:52 UTC by Telesto
Modified: 2024-01-23 04:41 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (11.27 KB, application/vnd.oasis.opendocument.text)
2020-10-28 19:53 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-10-28 19:52:54 UTC
Description:
Shapes disappear after undo followed by Enter

Steps to Reproduce:
1. Open the attached file
2. CTRL+A
3. CTRL+X
4. CTRL+Z
5. Enter

Actual Results:
Shapes gone

Expected Results:
Not so


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.1.0.0.alpha0+ (x64)
Build ID: 94e6e140491de31c0788c91af855a75a3bb12709
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 1 Telesto 2020-10-28 19:53:07 UTC
Created attachment 166821 [details]
Example file
Comment 2 Telesto 2020-10-28 19:57:45 UTC
The undo holds something selected.. 

1. Open the attached file
2. Type "A"
2. CTRL+A
3. CTRL+X
4. CTRL+Z
5. Enter

A is select when pressing Enter causing it disappear.. Same apparently happens without content on screen.
Comment 3 Telesto 2020-10-28 20:00:17 UTC
@Michael
Related to they anchoring being included in selection. CTRL+A including anchors without text on screen is pretty new (7.1 only)
Comment 4 Usha 2020-11-09 16:07:45 UTC
I was able to reproduce with the below steps provided.


Version: 7.0.2.2 (x64)
Build ID: 8349ace3c3162073abd90d81fd06dcfb6b36b994
CPU threads: 4; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 5 QA Administrators 2022-11-19 03:35:44 UTC Comment hidden (obsolete)
Comment 6 Stéphane Guillou (stragu) 2023-12-01 07:55:11 UTC
reproduced with recent trunk build:

Version: 24.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 5589659829f8a1cef8ca1c8a468732105bbe231b
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

And since 6.4.6.2, with Michael Stahl's 89dc2b547b4cc307f7d69715a5e1ed4a27691755, cherrypick of 2d89b9929e85bede4c72684a12e7508751875f0e:
tdf#133957 sw: SelectAll should select fly in empty section

Michael, what do you think? It makes sense that the same selection is restored at undo, but should this be turned into an enhancement to make it more obvious that objects ('s anchors) are selected, by e.g. using the same coloured highlight as a paragraph's on the object?
Or... should existing paragraph anchors be moved to the inserted paragraph? I'm really unsure what is sensible and what is a wildly wrong idea to be honest :)

And Mike, you recently discussed anchor selection, maybe you have an opinion.
Comment 7 Commit Notification 2024-01-22 10:29:49 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0b9d6406a40fe890ea003f8e503c4aca6f65c2e6

tdf#137839 sw: add drawing shapes anchored in selection to overlay

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Michael Stahl (allotropia) 2024-01-22 10:46:29 UTC
it's clearly not ideal that only sw fly frames are highlighted with an overlay but not drawing objects, turned out not much effort to highlight those too which should make things more obvious.
Comment 9 Stéphane Guillou (stragu) 2024-01-23 04:41:56 UTC
Thanks Michael, verified in:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 6d71c21890c908225945f0fc3566255ed150f660
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded