Patch Set 1:

I think the call to layout() is correct. If I remove the call and switch between "HEAD" and "refs/heads/master"  in the Source Ref combo I end up with blank space in the dialog. The call to layout ensures that all controls are packed properly after control visibility changes.