A few comments... and one question:
@Leo / Jon: For some reason, doing a 'Go REFRESH' after toggliing this option on doesn't work in [u]THE DEFAULT FOLDER [/u] opened when opening a new tab. Maybe that is something you'd consider a small bug? Also, what's the local option intended to do? I though maybe it was to operate only in the lister in which the option is toggled on on like my script or something, but that doesn't seem to be the case? I didn't have access to a network share in case it's for 'local' drives and not remote...?
@FunTanK: Leo's spot on, but depending on what their opinion on this is one potential drawback in doing a 'go refresh' is that it will lose whatever folder selection you may have made. Doing an explicit 'GetSizes' would also only calculate the 'selected' folders size.
In my script-based solution for this, I expected that most people who were turning the option on probably wanted all folders in the current folder to be calculated (at the moment the button is pressed to toggle auto sizing on). So in my version, I've implemented a variation on Jon's 'SmartGetSizes' command as a raw command that gets added to Opus which allows a GETALL option so that all folder sizes are calculated, regardless of any folders being selected or not, and also carried the NODESELECT option into this command so you don't lose whatever folder selection might be in effect when you run the command.
If that's of interest to you, I've attached here only the portion of my full solution which adds that new raw command (SmartGetSizes - all credit to Jon for the working code and name of the command ). You can then create your toggle button, and end the button with the command SmartGetSizes GETALL NODESELECT. To install the new command, just drag and drop the script OSP file attached to this post from a lister to the Preferences / Toolbars / Scripts page. After hitting Ok, you should then see 'SmartGetSizes' as an available command in the button editor and Customize->Commands dialog:
ScriptCommand_smartgetsizes.osp (1.8 KB)