Bug 413401

Summary: Plots are not saved
Product: [Applications] LabPlot2 Reporter: bond.anton
Component: generalAssignee: Alexander Semke <alexander.semke>
Status: RESOLVED FIXED    
Severity: critical CC: esina
Priority: NOR    
Version First Reported In: 2.7.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In: 2.8
Sentry Crash Report:
Attachments: Project file I was working with

Description bond.anton 2019-10-24 15:19:53 UTC
Created attachment 123462 [details]
Project file I was working with

SUMMARY
Plots are not saved in a project.

STEPS TO REPRODUCE
1. Open project
2. Create XY plot
3. Save project and exit LabPlot

OBSERVED RESULT
When reopening saved projects there are no plots

EXPECTED RESULT
Plots to be saved in project file

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Alexander Semke 2019-10-24 20:11:38 UTC
I assume you created the XY plot via the context menu and selected in the "Plot Data" dialog the option "new plot in a new worksheet". With this the new worksheet is added as child to the workbook in your project. Workbook should have only spreadsheets, no worksheets. This is a bug and we'll fix it.

As a workaround, just create manually a new worksheet first and use it in the plot data dialog. Alternatively, create manually the worksheet, plot and xy-curve and select the data columns from the spreadsheets for x and y-data.
Comment 2 Alexander Semke 2019-10-24 20:53:00 UTC
Git commit 9fb1574cf3bfba33a88143d2a326ebab0d0042db by Alexander Semke.
Committed on 24/10/2019 at 20:51.
Pushed by asemke into branch 'master'.

In plot data dialog, don't add new worksheets as children to workbooks,
use the proper parent aspect.
FIXED-IN: 2.8

M  +3    -1    src/kdefrontend/spreadsheet/PlotDataDialog.cpp

https://commits.kde.org/labplot/9fb1574cf3bfba33a88143d2a326ebab0d0042db
Comment 3 Alexander Semke 2020-03-12 21:01:14 UTC
*** Bug 418735 has been marked as a duplicate of this bug. ***