If you install Beta 3, you can try the following script button which I think will do what you want:
- if any folders are selected, and their sizes have not previously been calculated, only the selected folders will be calculated
- otherwise all folders will be calculated
<?xml version="1.0"?>
<button backcol="none" display="both" label_pos="right" textcol="none">
<label>Smart GetSizes</label>
<icon1>#default:getsizes</icon1>
<function type="script">
<instruction>@language vbscript</instruction>
<instruction />
<instruction>Function OnClick(ByRef ClickData)</instruction>
<instruction> fGetAll = True</instruction>
<instruction> for each file in ClickData.Func.Command.files</instruction>
<instruction> if file.is_dir and (not file.got_size) Then</instruction>
<instruction> fGetAll = False</instruction>
<instruction> exit for</instruction>
<instruction> end if</instruction>
<instruction> next</instruction>
<instruction> if fGetAll Then ClickData.Func.Command.ClearFiles</instruction>
<instruction> ClickData.Func.Command.deselect = False</instruction>
<instruction> ClickData.Func.Command.RunCommand "GetSizes"</instruction>
<instruction>End Function</instruction>
</function>
</button>