[PROBLEM] - Collapsing folders in the project tree

Started by Gal Shemesh, Wed 23/08/2023 18:42:30

Previous topic - Next topic

Gal Shemesh

Hi everyone, hope you're all doing well.

I've posted this in the 'Beginners' Technical Questions' forum and was suggested to report a problem here. Would appreciate if this could be fixed:

The current Project tree has a behavior of auto-collapse of folders in certain sections, such as in VIEWS and AUDIO.

If for example you create folders in these sections and then drag and drop assets from one folder to another in the same section, all the expanded folders in that section get collapse, and only the one that you dragged the asset into opens / remains open. This makes organizing of assets very difficult, especiallly if you have many sub-folders.

As far as I've checked, this happens in the VIEWS and AUDIOsections, and I just tested if it happens in the CHARACTERS section and it does - so I guess that it behaves that way in any place in the Project tree that can have folders in it.

Thanks
Gal Shemesh,
goldeng

Crimson Wizard

#1
From my memories of investigating the Editor's code, the root of this problem is that the whole subtree is getting recreated each time something changes in it. This is quite inefficient, and of course this causes the folders loose their collapsed/expanded state.

I do not know why this is done so, or since when, but it's possible that this behavior was introduced along with the folder support, which was done by contributors around the time the Editor went opensource (AGS v3.2.2).

The dumb approach would be to fix the consequence of the problem, for instance: remember which folders are expanded and restore them after the change. But the ideal approach would be to fix the root of the problem: find out why this subtree recreation is ever necessary, and change the code so that it's not performed.


EDIT: Opened a ticket:
https://github.com/adventuregamestudio/ags/issues/2105

SMF spam blocked by CleanTalk