MainWindow: Don't open new SQL tab when the current one is empty

When opening an SQL file don't open a new tab for it when the current
one is completely empty and could be used just as well.