disable splash screen for debugging
remove redundant code
erase correctly
don’t swap to be removed object if it’s already the last one
show the main window before the tool windows
so that the tool windows are correctly recognized as child windows on linux