Bug 146610 - Graphic position change is indicated after graphic object copy operation
Summary: Graphic position change is indicated after graphic object copy operation
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
7.0.0.3 release
Hardware: All All
: low trivial
Assignee: Caolán McNamara
URL: https://youtu.be/uE_o-eT8cWk
Whiteboard: target:7.5.0
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-06 10:57 UTC by dainius.mazuika
Modified: 2022-12-03 08:17 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (8.72 KB, application/vnd.oasis.opendocument.graphics)
2022-12-02 14:00 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dainius.mazuika 2022-01-06 10:57:02 UTC
Description:
1. Draw a line, set some properties in right-sidebar via "Position and Size" panel.
2. Select line -> Copy it via RMB mouse menu or CTRL + C -> See how Position X changes with no reason. Sometimes, position ir changed in reality when messing around with page zoom settings, or something like that.

See youtube screencast: https://youtu.be/uE_o-eT8cWk

Actual Results:
 

Expected Results:
 


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Buovjaga 2022-12-02 14:00:41 UTC
Created attachment 183959 [details]
Example file
Comment 2 Buovjaga 2022-12-02 14:07:26 UTC
Tested by changing measurement units to mm.

The effect was not visible in my first random try with a position differing from the one in the video, so I created an example file with the exact X and Y positions.

1. Open attachment 183959 [details]
2. Make sure the Properties panel of the Sidebar is visible
3. Select the line
4. Ctrl-C or right-click to copy

Deselecting and reselecting the line sometimes reverts the displayed values back immediately. Other times you need to deselect and reselect twice.

Bisected with linux-64-7.0 to https://git.libreoffice.org/core/commit/ec11b7330fab72dc56d847c7c3691fddbb18096e
Related: tdf#133189 values not updated when units changed
Comment 3 Caolán McNamara 2022-12-02 15:44:42 UTC
hmm, when we copy we create a new document to contain its contents and that calls SdModule::GetSdOptions which does a PutItem(...SID_ATTR_METRIC and that triggers listeners to reformat the various widgets that depend on the current metric which is why it happens on ctrl+c
Comment 4 Commit Notification 2022-12-03 00:01:57 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8d17ad0bb36b5c330e839fdd7517b37fa72002ae

Resolves: tdf#146610 don't reformat MetricSpinButtons if unit didn't change

It will be available in 7.5.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 5 Buovjaga 2022-12-03 08:17:40 UTC
Thanks, verified.

Arch Linux 64-bit
Version: 7.5.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 485c9d4f0e59e13e772da8f8a7975f0ddd77c33e
CPU threads: 8; OS: Linux 6.0; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 3 December 2022