Bug 470792

Summary: Can't undo change of range when zooming in on a graph
Product: [Applications] LabPlot2 Reporter: João Figueiredo <jf.mundox>
Component: generalAssignee: Alexander Semke <alexander.semke>
Status: CONFIRMED ---    
Severity: normal CC: jf.mundox, uwestoehr
Priority: NOR    
Version First Reported In: 2.10.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 2.12
Sentry Crash Report:

Description João Figueiredo 2023-06-08 15:04:15 UTC
SUMMARY
When scrolling on a graph, it zooms and the range changes; however, you can't undo it by pressing Ctrl+Z. This can be very annoying when you had selected a very specific range.

It looks like the zoom range isn't actually getting saved in the project file; that would explain why you can't undo it, why you can recover the old range by just restarting LabPlot, and why if you manually change the range in the plot properties, then you can undo it (because it does get saved with the file).


STEPS TO REPRODUCE
1. Load a new graph.
2. Scroll on it, so the range changes.
3. Attempt to undo it.

OBSERVED RESULT
It doesn't undo the change of range.

EXPECTED RESULT
It should undo it, regardless of whether it was caused by scrolling or manually setting it.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.9
Kernel Version: 6.3.6-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 1 Alexander Semke 2024-08-05 18:22:34 UTC
Git commit 1803a1cb350bcc99e7715e0f62a0eba01b3118fe by Alexander Semke.
Committed on 05/08/2024 at 18:20.
Pushed by asemke into branch 'master'.

Properly draw the border line of the symbol in the legend.

Removed the custom code in CartesianPlotLegen.cpp, use Symbol::draw() instead.
FIXED-IN: 2.12

M  +1    -0    ChangeLog
M  +4    -48   src/backend/worksheet/plots/cartesian/CartesianPlotLegend.cpp
M  +2    -2    src/backend/worksheet/plots/cartesian/Symbol.cpp
M  +2    -2    src/backend/worksheet/plots/cartesian/Symbol.h

https://invent.kde.org/education/labplot/-/commit/1803a1cb350bcc99e7715e0f62a0eba01b3118fe
Comment 2 Alexander Semke 2024-08-05 18:23:45 UTC
(In reply to Alexander Semke from comment #1)
> Git commit 1803a1cb350bcc99e7715e0f62a0eba01b3118fe by Alexander Semke.
> Committed on 05/08/2024 at 18:20.
> Pushed by asemke into branch 'master'.
> 
> Properly draw the border line of the symbol in the legend.
> 
> Removed the custom code in CartesianPlotLegen.cpp, use Symbol::draw()
> instead.
> FIXED-IN: 2.12
> 
> M  +1    -0    ChangeLog
> M  +4    -48   src/backend/worksheet/plots/cartesian/CartesianPlotLegend.cpp
> M  +2    -2    src/backend/worksheet/plots/cartesian/Symbol.cpp
> M  +2    -2    src/backend/worksheet/plots/cartesian/Symbol.h
> 
> https://invent.kde.org/education/labplot/-/commit/
> 1803a1cb350bcc99e7715e0f62a0eba01b3118fe

This message is not related to this bug, please ignore. Sorry.
Comment 3 Alexander Semke 2024-12-22 11:44:11 UTC
*** Bug 496626 has been marked as a duplicate of this bug. ***