Bug 117283 - Can't select a copied shape (form object) from navigator
Summary: Can't select a copied shape (form object) from navigator
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.1.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Navigator
  Show dependency treegraph
 
Reported: 2018-04-27 10:11 UTC by Marina Latini (SUSE)
Modified: 2018-05-21 14:05 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
example file (8.86 KB, application/vnd.oasis.opendocument.text)
2018-04-27 10:12 UTC, Marina Latini (SUSE)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marina Latini (SUSE) 2018-04-27 10:11:20 UTC
Description:
If you copy a form object the name assigned to the shape is the same. From the navigator you can see the second copied object but you can't select it.

Steps to Reproduce:
1. Form -> Text box (you can try also with different object)
2. Insert a first text box
3. Copy and paste the first object
4. From the navigator click on the 2 different shapes available

Actual Results:  
From the navigator you can see 2 different shapes with the same name but you can select always the first one.
You can select the second shape only with a direct click on it.

Expected Results:
Selecting the available shapes from the navigator you should select the proper object in the document.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 6.1.0.0.alpha1
Build ID: cb47f0d320994e001bc38dc2ee9b7d957b15e6ab
CPU threads: 4; OS: Linux 4.16; UI render: default; VCL: gtk2; 
Locale: it-IT (it_IT.UTF-8); Calc: group


User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
Comment 1 Marina Latini (SUSE) 2018-04-27 10:12:34 UTC
Created attachment 141700 [details]
example file

The second label is a copy of the first
Comment 2 Xisco Faulí 2018-04-27 11:09:30 UTC
Regression introduced by:

author  Jim Raykowski <raykowj@gmail.com>       2018-04-19 00:53:38 -0800
committer       Thorsten Behrens <Thorsten.Behrens@CIB.de>      2018-04-20
23:56:42 +0200
commit  0fab443fc5016d3088e485210a13f121a1ec1ee9 (patch)
tree    6368caeab8a91c11a75a859d078d80537462c5a8
parent  79391d92df7a474651e02980f238eac4781305ce (diff)
tdf#117024 Make Navigator Drawing objects scroll

Bisected with: bibisect-linux64-6.1

Adding Cc: to Jim Raykowski
Comment 3 Jim Raykowski 2018-04-28 01:01:34 UTC
I noticed this but didn't know I was the one that introduced it.

So it looks like the previous behavior was to select all shapes with the same name ...ahhh, that's why the orignal code didn't break from the loop immediatly after finding the shape name...

Here is a patch to restore the previous behavior:
https://gerrit.libreoffice.org/#/c/53582/
Comment 4 Commit Notification 2018-05-04 01:17:46 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=38407bec341f2018fe460a76440dc0641dd07cef

tdf#117283 Select all drawing objects with the same name

It will be available in 6.1.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 5 Xisco Faulí 2018-05-04 09:23:24 UTC
Verified in

Version: 6.1.0.0.alpha1+
Build ID: 213f12be2cab2106dde4a0e859faaa8259627c1a
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

However, I see something different than before, now, when both shapes are selected , when moving one, the other is moved as moved as well, it didn't happen before...
Don't know which is the correct behaviour though
@Marina, @Jim, any opinion here?
Comment 6 Marina Latini (SUSE) 2018-05-04 09:39:45 UTC
At least for PDF form creations, it's a quite common workflow to copy/paste similar objects for having for example multiple "text box" objects with the same properties.

Considering this use case, the correct behavior should be to have a different shape name for every pasted object. 
In this way could be simple to create several identical objects with a different shape name (that can be selected properly from the navigator).

If a shape created with a copy/paste is duplicated with the same shape name, will be impossible to select the proper object and, TBH, doesn't make sense to duplicate the object with the same shape name. We should use grouped objects for selecting a group of shapes.

A possible solution could be to ask to the user if the copied shape should be considered as a new object or as a grouped one.
Comment 7 Jim Raykowski 2018-05-06 18:51:03 UTC
(In reply to Xisco Faulí from comment #5)
> However, I see something different than before, now, when both shapes are
> selected , when moving one, the other is moved as moved as well, it didn't
> happen before...
> Don't know which is the correct behaviour though

Seems to me the correct behaviour is that after the patch. Previous to the patch, both double click and single click unselect grouped shapes and then select the clicked shape. Now single click selects the clicked shape and double click starts move action.
Comment 8 Commit Notification 2018-05-21 14:05:31 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e3ffa913e5729766803a76b765ab2bb3436c12f6

Improve placement of tdf#117024/tdf#117283 patches

It will be available in 6.1.0.

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

Affected users are encouraged to test the fix and report feedback.