Bug 466945 - Automatic selection of decimal separator doesn't work for pasted data
Summary: Automatic selection of decimal separator doesn't work for pasted data
Status: CONFIRMED
Alias: None
Product: LabPlot2
Classification: Applications
Component: frontend (show other bugs)
Version: latest
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Alexander Semke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-06 15:00 UTC by Dirk Niemeier
Modified: 2023-03-13 07:26 UTC (History)
0 users

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


Attachments
Text for clipboard (1.36 KB, text/plain)
2023-03-06 15:00 UTC, Dirk Niemeier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Niemeier 2023-03-06 15:00:13 UTC
Created attachment 157045 [details]
Text for clipboard

SUMMARY
***
The automatic detection of the decimal separator doesn't work in my use cases.


STEPS TO REPRODUCE
With a clean installation (nightly build 126) without any changes to the configuration: 
1.  Open the attached file in a text editor (the data comes from copy & paste from a 3rd party tool. Mark the entire content, copy to clipboard.
2.  Run Labplot, create a spreadsheet in Project.
3.  CTRL-V the data into the table. 

OBSERVED RESULT

The columns are detected as "Text". If you try to change the type of a col (or both) to "Float" the content is deleted: Changing back the type to "Text" doesn't bring back the values, they are truely deleted.

Workaround: Settings / Configure Labplot - set Decimal separator manually to the one used in the clipboard (or file) content. In this case switch between formats "Text" and "Float" will not delete the rows.

EXPECTED RESULT

Automatic recognition of "." (dot) as decimal separator. No deletion of values when switching between (invalid?) formats.

SOFTWARE/OS VERSIONS
Windows: 10 20H2 (yes, 20!)
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Alexander Semke 2023-03-13 07:26:47 UTC
(In reply to Dirk Niemeier from comment #0)
> Created attachment 157045 [details]
> Text for clipboard
> 
> SUMMARY
> ***
> The automatic detection of the decimal separator doesn't work in my use
> cases.
This is an open point right now, yes. We need to implement something similar that is available in LibreCalc, Excel and co. where the user is asked to provide the decimal separator prior to pasting the data. We should implement this in 2.11.

As to the workaround, a more easier was is maybe just to import your file into the spreadsheet. In the import file dialog it's possible to provide many different settings including the decimal separator. With this you don't need to modify the application settings.