Why don't you simply examine the return value from the first dialog back in the mainwindow code, and use it to determine whether to launch the second dialog?