lucaschessR2 icon indicating copy to clipboard operation
lucaschessR2 copied to clipboard

Opening variations get added in lines before or after the current position making it difficult to have a main line.

Open chemtov opened this issue 2 years ago • 1 comments

Hi,

not a bug, but rather an annoyance.

When I create a new line in the opening it gets inserted sometime before, sometime after. This is annoying (to me) as I usually start with my main line and add up variations, but here the lines get all mixed up.

Then when I practice the first line won't be my main line, but some variation and my main line will be "somewhere".

I didn't find a way to change the order of the line.

Here's is a example. I started with my main line (exd5 for white) and then created a variation (Nxd5) which got inserted before as line number 1.

Screenshot from 2023-03-19 12-18-37

Then, (after closing and re-opening the opening study) I added another variation, and it got inserted after this time:

Screenshot from 2023-03-19 12-30-45

Again, only annoying, but it would nice if variation would get added always after and/or if we could move the line "up and down" in order to re-order them.

Regards,

chemtov avatar Mar 19 '23 11:03 chemtov

All lines internally are encoded in an abbreviated mode, forming a string of characters. Internally they are sorted alphabetically, so when adding a variant, the resulting string can be above or below the current one. The advantage is that it is very easy to program. The alternative would be to assign a weight to each movement, which would allow the order to be defined manually, or for new variants to always appear below. The problem is that it is not easy to implement, the idea is simple but the foreseeable side effects are many. I will think about it.

lukasmonk avatar Mar 30 '23 17:03 lukasmonk