nfdi4plants/Swate

[Bug]: Pasting value into unit cell overrides unit

Opened this issue · 3 comments

Contact Details

micwij@gmail.com

What happened?

When pasting a value (Ctrl + V) into a cell that has a unit the unit disappears. In the hidden cells the unit column now has a "-". With right click and selecting "as Unit cell" the value gets transferred to the hidden Unit column instead of restoring the original unit.

When typing in the value the unit persists, however there are two other things that I noticed here:

  1. The first keystroke per cell does not fill in any value.
  2. The hidden Unit column takes on the whole value e.g. "1 Liter" instead of retaining just the unit e.g. "Liter".

What did you expect?

I would expect the unit to persist independent of whether it is typed in individually or pasted in with Ctrl + V.
Having individual cells without a unit or a different unit then other cells of the same column may be desirable in specific cases but under default conditions, I would expect cells in the same column to have the same unit.

Host

Standalone

Host Details

Same behavior in Swate plug-in in
Arcitect version: 0.0.40

Swate version

v1.0.0-beta.07

Hello, thank you for the feedback! What exactly is the "value" you are trying to paste?

I was only trying with numbers before e.g. "5" or "44.2" but I just tested it with a text and it looks like it has the same effect, although cells with a unit most likely would not have text in them.

Sorry for not answering for quite some time! I was on a longer time away and this message got lost in the douzens of emails i got.

Okay i think i understand the issue. You copy one value such as "5", "44.2" or "text placeholder" and paste it into a unit cell.

The current implementation fits the pasted value in the full unit block. Which means value, unit name, unit tsr and unit tan. As you only paste one value it assumes empty for the others. This is a rather complex issue which is not easily fixable.

Is a new context menu option a possible solution? Something along the lines "Paste Update"?