Tested with Open Community Edition version 6.4. I dont know if the bug happens in other versions.
New folders shows a plus mark [+] even when they have nothing inside. Its really annoying for users to check folders to see if there is some subfolder in one of the folders with the plus mark.
Also folders are not checked when the users logs in, and they show a plus mark [+] like if they had some subfolder inside, really annoying.
After logging in, the folders must be checked to be empty and refresh the folder three. If I click on a folder which is empty (and doesnt have a subfolder), I dont see the plus mark [+] again, and it works right after the next logging.
I can upload screenshoots or even give remote access to my computer if needed.
Thanks in advance.
[bug] Empty folders shows a [+] plus mark
Moderator: car031
Post
Re: [bug] Empty folders shows a [+] plus mark
Unfortunately, to perform this kind of check for every node justo to change an icon, will lead to perfromance issues on large installations.
For this reason the actual behaviour seems an acceptable trade-off
For this reason the actual behaviour seems an acceptable trade-off
Post
Re: [bug] Empty folders shows a [+] plus mark
Well I think that there must be something wrong since sometimes it works and sometimes not. Didnt check the code but Im sure there are good options to solve it without affecting performance.
1. If the Folder Tree is built from an external plugin or external code, there could be updates on the code to solve the issue.
2. There is an easy solution, which wont affect the performance and will solve the issue:
- Currently the "OpenMainFolder()" function call is done each time we open a folder, and it refreshes the folder icon with the right one.
- The solution would be to add to that function a new check for Subfolders found when we open a Mainfolder and refresh its icon with the right one.
Example:
The current function of opening a MainFolder should be similar to this one, since it refresh the icon and shows the right one:
//If we close the folder, it will probably contain files, so we dont need to check again for those files. Anyway currently the function works right so no change is needed.
We can add a simple fix to the OpenMainFolder() function which will solve the issue:
I am sure it wont affect performance, but anyway I think this is a needed fix and something which should be solved because users desesperate looking at folders because they dont know if there is something new.
LogicalDoc is excellent and has a great support but unnafortunately, I am sure that our users wont use the product because of the issue.
Dont have much time these days, but Ill try to rebuild the open Community Source project to test the fix at the original code and check for performance.
1. If the Folder Tree is built from an external plugin or external code, there could be updates on the code to solve the issue.
2. There is an easy solution, which wont affect the performance and will solve the issue:
- Currently the "OpenMainFolder()" function call is done each time we open a folder, and it refreshes the folder icon with the right one.
- The solution would be to add to that function a new check for Subfolders found when we open a Mainfolder and refresh its icon with the right one.
Example:
The current function of opening a MainFolder should be similar to this one, since it refresh the icon and shows the right one:
Code: Select all
int OpenMainFolder()
{
int dRet = 0; //for return purposes
int dLitRet = ListFilesAndFolders();
RefreshFolderIcon(dLitRet); //Passing a 0 value wont show a plus mark [+] since the folder is empty. Passing 1 will show the minus mark since its open [-].
}
Code: Select all
int CloseMainFolder()
{
int dRet = 0; //for return purposes.
int dLitRet = 2; //we will pass a 2 value since the folder contained subfiles or subfolders.
RefreshFolderIcon(dLitRet); //Passing a 2 value will show a plus mark since the folder is closed and had files or folders. This works in 6.4 so no change is needed.
}
We can add a simple fix to the OpenMainFolder() function which will solve the issue:
Code: Select all
int OpenMainFolder()
{
int dRet = 0; //for return purposes
int *vEmptyFolders = new int[MAX_FILES]; //Array to save if the subfolders found are empty or not.
int dLitRet = ListFilesAndFolders(&vEmptyFolders); //Now ListFilesAndFolders will also save subfolders found in an array, saving if they are empty or not.
RefreshFolderIcon(dLitRet); //Passing a 0 value wont show a plus mark [+] since the folder is empty. Passing 1 will show the minus mark since its open [-].
RefreshSubFoldersIcon(vEmptyFolders); //Since the array if filled with 0 for empty folder or 1 for nonEmpty folders, we can show the right icon.
delete [] vEmptyFolders;
}
LogicalDoc is excellent and has a great support but unnafortunately, I am sure that our users wont use the product because of the issue.
Dont have much time these days, but Ill try to rebuild the open Community Source project to test the fix at the original code and check for performance.
Who is online
Users browsing this forum: No registered users and 22 guests