Author Topic: Folder Sizes Not Calculated if Any File/Folder Selected  (Read 10789 times)

AlanJB

  • VIP Member
  • *****
  • Posts: 432
  • VERY old Programmer
    • View Profile
Mathias,

In the spirit of WasabiNME's post here http://forum.multicommander.com/forum/index.php/topic,1774.0.html, this has to be, I believe, a bug or at least an oversight.

It is a folder size issue:  if any file/folder is selected in the active tab then calculation of folder sizes - using shortcut Shift+Alt+Enter or Menu->Tools->Calculate folder size - fails.  If this were changed, it could, for example, allow users to determine if they can copy/move the selected files/folders to the target.

Can you please take a look and either add it to the next release, or explain why it would not be practical.

TIA

Alan

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4271
    • View Profile
    • Multi Commander
Re: Folder Sizes Not Calculated if Any File/Folder Selected
« Reply #1 on: June 24, 2016, 12:06:27 »
Ehh I can't recreate that..

If you got selected items it will calculate on them only if nothing is selected, it will calculate on everything.
And when you select folders using space it will select that folder and calculate for that folder.

« Last Edit: June 24, 2016, 12:21:41 by Mathias (Author) »

AlanJB

  • VIP Member
  • *****
  • Posts: 432
  • VERY old Programmer
    • View Profile
Re: Folder Sizes Not Calculated if Any File/Folder Selected
« Reply #2 on: June 24, 2016, 13:04:29 »
Well, strangely, it seems to be working today  :-\

No wait - just retested...  If only files are selected, then it will not calculate any folder sizes.

Ulfhednar

  • Contributor
  • VIP Member
  • *****
  • Posts: 503
    • View Profile
Re: Folder Sizes Not Calculated if Any File/Folder Selected
« Reply #3 on: June 25, 2016, 12:39:02 »
Always worked for me as Mathias said.
If you have something selected & hit <space> or use the folder+KB icon, the selection returns a size.
If you have nothing selected & hit <Shift+Alt+Return> everything returns its' size.

What happens when I select something & use <Shift+Alt+Return> is interesting though

EG:- in a dir with 7 folders & 15 files -
1 - select some files - 5 of 15 & hit <Shift+Alt+Return> = all 15 files are calculated
2 - select some folders - 3 of 7 & hit <Shift+Alt+Return> = 3 folders + all 15 files are calculated

The way MC differentiates between folders & files for a mixed selection in these cases of calculation is not something I noticed before as I always select something or nothing.

Nice find AlanJB :D

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4271
    • View Profile
    • Multi Commander
Re: Folder Sizes Not Calculated if Any File/Folder Selected
« Reply #4 on: June 25, 2016, 12:48:22 »
EG:- in a dir with 7 folders & 15 files -
1 - select some files - 5 of 15 & hit <Shift+Alt+Return> = all 15 files are calculated
2 - select some folders - 3 of 7 & hit <Shift+Alt+Return> = 3 folders + all 15 files are calculated

The way MC differentiates between folders & files for a mixed selection in these cases of calculation is not something I noticed before as I always select something or nothing.
Eh ? Files already have a size on them..   Calc Folder size do nothing with files since they are files and not folders.
If you got selected items. it sends them all to the "calc folder size" for this items. and it will check if the items are files or folder.  if they are files nothing happen since it can't expand a file.. (normally)




Ulfhednar

  • Contributor
  • VIP Member
  • *****
  • Posts: 503
    • View Profile
Re: Folder Sizes Not Calculated if Any File/Folder Selected
« Reply #5 on: June 27, 2016, 14:01:22 »
Yes files already show sizes, & I am mad.  ::)

I was trying to get MC to act as AlanJB described, & I thought I saw what he was saying was different to what I expect when I use MC file/folder size calc.

What I did was look at the hi-lited block & how it responds to the <Shift+Alt+Return> instruction.
I haven't really made that clear to myself at time of writing :-[  :)

AlanJB

  • VIP Member
  • *****
  • Posts: 432
  • VERY old Programmer
    • View Profile
Re: Folder Sizes Not Calculated if Any File/Folder Selected
« Reply #6 on: June 28, 2016, 10:04:42 »
I've taken a closer look at this and I believe that the functionality would be improved by changing the recalculate logic to:

Code: [Select]
if (any folders are selected)
  only calculate selected
else
  calculate all folder sizes
endif

This way you always get what you need (ie., folder sizes!) and no selections would be lost.

Feedback, anyone?