Resize main window early to fix load dialog position when triggered via commandline