Update mainwindow.cpp/h

Add a little fix for saving of mainwindow geometry and state
Fix same little issues