every_door icon indicating copy to clipboard operation
every_door copied to clipboard

Fixed leading semicolon and duplicate values for floor & level tags

Open lihongman opened this issue 2 years ago • 2 comments

While looking around and testing, the semicolon issue also occurs in the levels field and can pop up when a previously existing (when saved) floor value is manually typed in after deselecting the equivalent radio button.

Issue comes from floor objects where null/ and / are different objects which can occur when manually adding floor/levels and deselecting radio buttons as was shown in the bug report.

Duplicate values in both level and floor fields appears due to same issue.

Fixes #639

lihongman avatar Feb 13 '24 20:02 lihongman

Herman, first, thanks for the pull request! The reason I'm not merging it is that toSet() call would mess up the order and the relation of two lists of values. Currently if we have level=0;1 and addr:floor=C;A, we can be sure level=0 means floor=C. The order is important. And if we delete some of values, e.g. level=0;1;2, addr:floor=C;A;A, then we cannot be sure what's the corresponding floor is the level=2. Or level=0 — which one was omitted even. Omissions are recorded by having empty values in lists, e.g. addr:floor=C;;A.

The issue is clearly with not enough tests. I'm planning to write more. Just didn't have the time.

Zverik avatar Apr 15 '24 10:04 Zverik

Ah, kinda forgot about I had this up. Got it, hopefully what I tried doing at least provided some extra context on the bug.

lihongman avatar Apr 16 '24 01:04 lihongman