News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

PR#546 - Partial depot dialog updates and bug fixes

Started by Ranran, June 04, 2022, 11:46:36 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ranran

The depot dialog is now a powerful spaghetti monster and we have to defeat it.
I have tried to defeat it many times and have been defeated each time. (´・ω・`)

The reason why the extended depot dialog has grown so much is due to the fusion with the replace dialog.
This is the difference between standards and why it's difficult to get it sane.

I came up with a strategy of partially purifying it and finally completely purifying it.
Pull request #546 is a partial purification of depot dialog. But I must confess that this was accompanied by major side effects.
Something important to it was transplanted up. Don't be confused by its strange appearance.  ::'(
This was an almost unavoidable procedure...
The basic structure of the new UI is like an Excel table.
It is extremely difficult to separate and display different things. That is, the line selector and the five buttons are the same chimera parts(depot frame), but the images of the vehicles that make up the convoy are different chimera parts(convoy assembler).
In other words, depot frame, convoy assembler and replace frame - the fusion of these three chimeras is the decisive difference from standard. So, the chimera parts need to be further disassembled and complicated to maintain the current placement.
The replace dialog is still largely uncpurified, so the layout remains the same.
Anyway, this patch is in the process of turning spaghetti into a fitcine.
Delete unused variables, delete display coordinate calculations, delete useless variables, and so on.

There are no functional changes other than the placement change.
Fortunately, this bug is fixed by this patch.

And, this branch forks from a slightly earlier version that is not the master.
You can verify that this bug does not exist by testing it without merging it.
So the second bug was caused by another code that wasn't a depot dialog.
Probably a merge from the standard. Therefore, it can be difficult to solve it at present. Because it's difficult to purify this chimera, and it's not the GUI code that caused it, but the code related to the interaction. Maybe by merging from standard.

EDIT:
supplement: In standard, old layout is possible because they are handled by the depot frame. Since extended shares the code with the replace frame, the same layout may be feasible if the replace frame is integrated, but that means recreating the replace frame code from scratch.

The old layout was inherited from the standard. I would appreciate feedback on whether this change is acceptable.

jamespetts

Excellent, thank you for this. Some initial feedback:

* for some reason, the text colours for lines in the line management dialogue showing, e.g., an unprofitable line in red seem no longer to work;
* In aircraft depots with oversized aircraft (as in Pak128.Britain(-Ex)), the last row of aircraft cannot be scrolled to or selected easily;
* the new layout (buttons at the top) is clear and easy to use and I do not see any difficulty in changing to this layout.

Also, can I check whether this change works with the ex-15 branch?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ranran

#2
Thank you for testing it.

Quote from: jamespetts on June 05, 2022, 01:57:21 PM* for some reason, the text colours for lines in the line management dialogue showing, e.g., an unprofitable line in red seem no longer to work;
This is a symptom that can be seen immediately after loading demo.save, and I think it is a symptom that has existed for some time. I think that it will be displayed correctly in a normal save file.
I don't know how this occurs, but I don't think it's due to this patch.

Quote* In aircraft depots with oversized aircraft (as in Pak128.Britain(-Ex)), the last row of aircraft cannot be scrolled to or selected easily;
I think I've fixed this issue.

QuoteAlso, can I check whether this change works with the ex-15 branch?
I confirmed that it works even with 15.0. However, as I reported earlier, please note that the display about the livery scheme was broken before the merging of this patch.

EDIT:
The depot dialog on the 15.0 branch seems to have a problem with the response. I haven't confirmed if this was the case before the merge of this patch.
There can be a lot of looping related to the livery scheme. This is probably irrelevant to this patch.

jamespetts

Thank you for this. I am unable to merge this into my ex-15 branch, as I get a merge conflict, so I cannot test this. I can confirm, however, that the depot dialogue does respond to input in the ex-15 branch as it currently stands in my repository (road vehicles appear to travel far too quickly, but that is another matter entirely). So, if attempts to interact with the depot dialogue in ex-15 are failing, then the failure would seem to be introduced by the code on this branch.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ranran

#4
Quote from: jamespetts on June 06, 2022, 05:26:27 PMI am unable to merge this into my ex-15 branch, as I get a merge conflict, so I cannot test this.
I think you tried to merge different branches. Test ex15-2206. It has no conflicts, but I don't remember if there were any conflicts when merging. However, it already contains the contents of ex-15 and master, so no additional merging is needed.

Quote from: jamespetts on June 06, 2022, 05:26:27 PMI can confirm, however, that the depot dialogue does respond to input in the ex-15 branch as it currently stands in my repository
What I wanted to say in a previous post is not that it doesn't respond, but that many loops about the livery scheme bug make the update seem slow. This is a symptom already seen in December 2020 and I think I have already reported it at that time. The contents of the livery selector were also broken from that time.


I found my report at that time below.
Quote from: Ranran on December 21, 2020, 03:48:13 AMEDIT5:
The game pauses when opening the depot dialog or replace dialog. It seems to be overloaded. (EDIT6: This could only be railways.)
The depot dialog and the replace dialog are extremely unresponsive and lagging. (EDIT6: This could only be railways.)
For some reason, the list of selectable livery in the depot dialog was corrupted. Lists are displayed repeatedly. (EDIT6: It's broken on the railroad, but it doesn't seem to be broken on the bus.

EDIT:
Another post reports that the livery scheme info is also broken on the convoy detail dialog, indicating that there is a problem with the livery scheme data.
https://forum.simutrans.com/index.php?msg=193539

jamespetts

Quote from: Ranran on June 06, 2022, 05:48:18 PMI think you tried to merge different branches. Test ex15-2206. It has no conflicts, but I don't remember if there were any conflicts when merging. However, it already contains the contents of ex-15 and master, so no additional merging is needed.
Thank you for your reply. What I meant was that I was unable to merge this branch into my own ex-15 branch. The ex-15 branch is a merge of your ex15-2202 branch and the master branch.

I see that you have now produced a separate ex15-2206 branch. Can I check whether this is much different from my ex-15 branch?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ranran

Quote from: jamespetts on June 07, 2022, 11:15:08 AMI see that you have now produced a separate ex15-2206 branch. Can I check whether this is much different from my ex-15 branch?
The ex15-2206 branch is a branch from your ex-15 branch.
Therefore, the difference from ex-15 is that the conflict with master has been resolved, some bugs in the schedule UI have been fixed, and depot dialog-related changes have been added.
Note that the schedule UI is incomplete because it doesn't implement many features.

jamespetts

Excellent, thank you for that, and apologies for the delay. I have now merged this both with the ex-15 branch and the master branch and confirm that it now works well. Thank you for your work on this.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.