Bug 496480 - LabPlot deletes Origin files
Summary: LabPlot deletes Origin files
Status: RESOLVED FIXED
Alias: None
Product: LabPlot2
Classification: Applications
Component: general (other bugs)
Version First Reported In: latest
Platform: Other Other
: NOR major
Target Milestone: ---
Assignee: Stefan Gerlach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-20 02:59 UTC by uwestoehr
Modified: 2024-11-26 16:44 UTC (History)
1 user (show)

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


Attachments
original Origin file (118.93 KB, application/octet-stream)
2024-11-20 02:59 UTC, uwestoehr
Details
screenshot of the dialog that pops up on closing LabPlot (102.55 KB, image/png)
2024-11-20 03:00 UTC, uwestoehr
Details
the result - an empty Origin file (118.77 KB, application/xml)
2024-11-20 03:01 UTC, uwestoehr
Details
screencast showing the recipe to reproduce (1.01 MB, image/gif)
2024-11-24 00:44 UTC, uwestoehr
Details
screenshot showinghe OPJ file when it is loaded (7.91 KB, image/png)
2024-11-24 00:45 UTC, uwestoehr
Details
screenshot showing that the OPJ file was modified (7.77 KB, image/png)
2024-11-24 00:47 UTC, uwestoehr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description uwestoehr 2024-11-20 02:59:16 UTC
Created attachment 175966 [details]
original Origin file

This is with the nightly build 19-11-2024:

- open the attached Origin file
- in the plot move the legend just a millimeter (that it disappears is bug 496478)
- now just close LabPlot

result: you are asked to save the project UNTITLED, see the screenshot attached
Click Yes
result: you don't get a new LabPlot file, but the Origin file is overwritten. Attached is the result -> the file is empty

This is a major bug because you loose your data if you haven't made a backup of your Origin file.
Comment 1 uwestoehr 2024-11-20 03:00:46 UTC
Created attachment 175967 [details]
screenshot of the dialog that pops up on closing LabPlot
Comment 2 uwestoehr 2024-11-20 03:01:28 UTC
Created attachment 175968 [details]
the result - an empty Origin file
Comment 3 Stefan Gerlach 2024-11-20 23:16:17 UTC
When i press "Save" when ask while closing LabPlot, i get a new file dialog to select the LML file to save to. The original OPJ file can not be selected for overwriting. Did i miss something?
I'm curious how you could select an OPJ file for saving.
Comment 4 uwestoehr 2024-11-24 00:44:34 UTC
(In reply to Stefan Gerlach from comment #3)
> I'm curious how you could select an OPJ file for saving.

I did not select it. here again my recipe:
1. double-click on the OPJ file (see the attached screenshot showing that the OPJ file was last modified on Nov 20)
2. go to the plot
3. move the legend a bit
4. click on LabPlot's main window to close it
5. in the appearing save dialog click "Save"
(see the attached screencast that shows step 2. to 5.

as result you get an empty OPJ file, see the attached screenshot that shows that the file was now modified.
Comment 5 uwestoehr 2024-11-24 00:44:57 UTC
Created attachment 176073 [details]
screencast showing the recipe to reproduce
Comment 6 uwestoehr 2024-11-24 00:45:58 UTC
Created attachment 176074 [details]
screenshot showinghe OPJ file when it is loaded
Comment 7 uwestoehr 2024-11-24 00:47:00 UTC
Created attachment 176075 [details]
screenshot showing that the OPJ file was modified
Comment 8 Stefan Gerlach 2024-11-26 16:44:32 UTC
Git commit bb7c42d7bb3b47d131a5ac5cfe83ed422577da6c by Stefan Gerlach.
Committed on 26/11/2024 at 16:26.
Pushed by sgerlach into branch 'master'.

don't overwrite OPJ files when saving

M  +6    -3    src/frontend/MainWin.cpp

https://invent.kde.org/education/labplot/-/commit/bb7c42d7bb3b47d131a5ac5cfe83ed422577da6c