Bug 480593 - Multiple axes Placement not stored
Summary: Multiple axes Placement not stored
Status: RESOLVED FIXED
Alias: None
Product: LabPlot2
Classification: Applications
Component: general (other bugs)
Version First Reported In: 2.10.0
Platform: Flatpak Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Semke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-31 10:54 UTC by Sammy
Modified: 2024-02-26 10:01 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 2.11
Sentry Crash Report:


Attachments
LabPlot Plot with 4 y-axes (30.19 KB, application/x-xz)
2024-01-31 10:54 UTC, Sammy
Details
Export of the plot after re-positioning and saving again (59.54 KB, image/png)
2024-02-21 20:19 UTC, Alexander Semke
Details
Project after re-positioning the axes and saving again (24.27 KB, application/x-labplot2)
2024-02-21 20:19 UTC, Alexander Semke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sammy 2024-01-31 10:54:12 UTC
Created attachment 165390 [details]
LabPlot Plot with 4 y-axes

SUMMARY
If you create a plot with multiple axes (https://labplot.kde.org/2021/10/27/multi-axes-made-easy/) and have custom places for them. The placement is not restored when reopening the file.

STEPS TO REPRODUCE
1. Create Graph with multi axes
2. Move the axes to the left
3. save and exit
4. open the saved file

OBSERVED RESULT
All axes except the first one are in the middle of the graph).

EXPECTED RESULT
The placement of the axes from step 2 should be restored.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: openSuse Leap 15.5 
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
LapPlot installed from flathub

ADDITIONAL INFORMATION:
The plot where I had the problem is attached.
Comment 1 Alexander Semke 2024-01-31 18:49:52 UTC
(In reply to Sammy from comment #0)
> Created attachment 165390 [details]
> LabPlot Plot with 4 y-axes
> 
> SUMMARY
> If you create a plot with multiple axes
> (https://labplot.kde.org/2021/10/27/multi-axes-made-easy/) and have custom
> places for them. The placement is not restored when reopening the file.
> 
> STEPS TO REPRODUCE
> 1. Create Graph with multi axes
> 2. Move the axes to the left
> 3. save and exit
> 4. open the saved file
> 
> OBSERVED RESULT
> All axes except the first one are in the middle of the graph).
> 
> EXPECTED RESULT
> The placement of the axes from step 2 should be restored.
> 
> SOFTWARE/OS VERSIONS
> Linux/KDE Plasma: openSuse Leap 15.5 
> KDE Plasma Version: 5.27.9
> KDE Frameworks Version: 5.103.0
> Qt Version: 5.15.8
> LapPlot installed from flathub
> 
> ADDITIONAL INFORMATION:
> The plot where I had the problem is attached.

This problem was solved last year already, the fix is not part of the 2.10 release that you're using, though. Would it be possible for you to work with flatpak package for the current development version, which is very close to the upcoming release 2.11 already, and to confirm this problem is solved for you? Once you have the newer version, just place your axes once more and re-save the project - the problem should be gone.
Comment 2 Sammy 2024-02-02 07:03:57 UTC
Hi,

thanks for the fast reply. I switched to the nightly version, but unfortunately the problem seems to persist. I saved the plot once again with the correct positions of the axes and after reopening, they are in the middle again.
Comment 3 Alexander Semke 2024-02-03 18:13:15 UTC
(In reply to Sammy from comment #2)
> Hi,
> 
> thanks for the fast reply. I switched to the nightly version, but
> unfortunately the problem seems to persist. I saved the plot once again with
> the correct positions of the axes and after reopening, they are in the
> middle again.
Can you please paste the content shown in the first tab in the "About LabPlot"-dialog?
Comment 4 Sammy 2024-02-04 08:05:37 UTC
(In reply to Alexander Semke from comment #3)
> (In reply to Sammy from comment #2)
> > Hi,
> > 
> > thanks for the fast reply. I switched to the nightly version, but
> > unfortunately the problem seems to persist. I saved the plot once again with
> > the correct positions of the axes and after reopening, they are in the
> > middle again.
> Can you please paste the content shown in the first tab in the "About
> LabPlot"-dialog?

Oh course.
Now I'm a bit puzzled. In the window head it says nightly, but in the about window not.

Window title: LabPlot (Nightly)
About Window content:

LabPlot is a FREE, open-source and cross-platform Data Visualization and Analysis software accessible to everyone.

Debug build 69216fe
Jan 4 2024, 23:56:16
System: KDE Flatpak runtime
Locale: German,Germany (Decimal point ',', Group separator '.'
Number settings: Decimal point ',', Group separator '.', Exponential 'e', Zero digit '0', Percent '%', Positive/Negative sign '+'/'-' (Updated on restart)
Architecture: x86_64-little_endian-lp64
Kernel: linux 5.14.21-150500.55.44-default
C++ Compiler: GNU 12.2.0
C++ Compiler Flags: -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -fno-operator-names -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Werror=init-self -Wvla -Wdate-time -Wsuggest-override -Wlogical-op -fdiagnostics-color=always -Wall -Wextra -Wundef -Wpointer-arith -Wunreachable-code -Wunused -Wdeprecated-declarations -fno-omit-frame-pointer -fstack-protector -fexceptions -std=c++17 -O2 -Wcast-align -Wswitch-enum -fvisibility=default -pedantic -Wzero-as-null-pointer-constant

(c) 2007-2023
Comment 5 Stefan Gerlach 2024-02-09 14:38:52 UTC
The "nightly" Flatpak will now be updated with every change in the development version (master), so please try again.
Comment 6 Alexander Semke 2024-02-10 09:33:00 UTC
(In reply to Sammy from comment #4)
> Oh course.
> Now I'm a bit puzzled. In the window head it says nightly, but in the about
> window not.
The problem with the  not updated flatpack images was solved. Can you please try out the current version and config the issues with saving the axes is solved for you?
Comment 7 Sammy 2024-02-12 08:56:53 UTC
Good morning,

I installed the latest nightly flatpak, but the problem persists. I can see, that the UI differs from the nightly release before (LapPlot draws boxes around elements such as additional y-axes), but after repositioning the axes, saving and reopening all the additional y-axes are in the center again.
Comment 8 Alexander Semke 2024-02-21 20:19:10 UTC
Created attachment 165981 [details]
Export of the plot after re-positioning and saving again
Comment 9 Alexander Semke 2024-02-21 20:19:45 UTC
Created attachment 165982 [details]
Project after re-positioning the axes and saving again
Comment 10 Alexander Semke 2024-02-21 20:22:15 UTC
(In reply to Sammy from comment #7)
> Good morning,
> 
> I installed the latest nightly flatpak, but the problem persists. I can see,
> that the UI differs from the nightly release before (LapPlot draws boxes
> around elements such as additional y-axes),
Yes, for performance reasons we're drawing now the bounding box of the axis when hovering over it or selecting it instead of drawing the exact shape including the texts etc. (https://invent.kde.org/education/labplot/-/merge_requests/439)

> but after repositioning the
> axes, saving and reopening all the additional y-axes are in the center again.
I cannot reproduce this problem. Can you please open the attached project and check the position of the axes? Do you get the same result as shown on the attached png file?
Comment 11 Sammy 2024-02-21 21:57:49 UTC
Oh no!

Now I see, I repositioned the axes not the right way. When I choose position from the General tab it works like a charm.

I positioned the axes by clicking on them and then use the arrow keys to move them to the desired location. This placement is still not stored.
Is this the desired behavior? If so, then we can happily close this bugreport and I want to say thank you for your kind help!
Comment 12 Alexander Semke 2024-02-21 22:12:33 UTC
(In reply to Sammy from comment #11)
> Oh no!
> 
> Now I see, I repositioned the axes not the right way. When I choose position
> from the General tab it works like a charm.
> 
> I positioned the axes by clicking on them and then use the arrow keys to
> move them to the desired location. This placement is still not stored.
> Is this the desired behavior?
The axes shouldn't be actually movable via arrows key and mouse moves at all to avoid unwanted and occasional position changes. This is a regression, we'll fix it. The positioning for the axes should be done via the properties explorer. We still can think about allowing to move the axis via keys and mouse, but then we need to do it properly and to also update the position correctly. We'll think about it. Thank you for reporting this issue.
Comment 13 Alexander Semke 2024-02-24 15:19:47 UTC
Git commit 6123b33c7be660410baaced3724330cc9ab34abd by Alexander Semke.
Committed on 24/02/2024 at 13:59.
Pushed by asemke into branch 'master'.

Don't allow to move axes with the arrow keys.
FIXED-IN: 2.11

M  +6    -2    src/backend/worksheet/WorksheetElement.cpp
M  +1    -0    src/backend/worksheet/plots/cartesian/Axis.cpp
M  +3    -4    src/kdefrontend/widgets/LabelWidget.cpp

https://invent.kde.org/education/labplot/-/commit/6123b33c7be660410baaced3724330cc9ab34abd
Comment 14 Sammy 2024-02-26 09:48:44 UTC
Hey,

is it helpful if I test with the latest nightly if I can confirm the fix?
Comment 15 Alexander Semke 2024-02-26 10:01:19 UTC
(In reply to Sammy from comment #14)
> Hey,
> 
> is it helpful if I test with the latest nightly if I can confirm the fix?
We're more or less done with the development of new features for 2.11 and are doing now bug fixing and preparing everything for the next release. Any additional testing with the nightly builds and feedback is very welcome, yes!