VSplitter size is incorrectly saved if window has never been visible

git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@154 b624d157-de02-0410-bad0-e51aec6abb33
master
sniperbeamer 17 years ago
parent bd4d56f8b2
commit e94a4244c3
  1. 4
      src/mainwindow.cpp

@ -961,7 +961,9 @@ void KeepassMainWindow::closeEvent(QCloseEvent* e){
#endif
config->setMainWindowGeometry(geometry());
config->setVSplitterPos(VSplitter->saveState());
// workaround if window has never been visible
if (isVisible() || VSplitter->sizes()[0]!=VSplitter->sizes()[1])
config->setVSplitterPos(VSplitter->saveState());
if (config->showEntryDetails())
config->setHSplitterPos(HSplitter->saveState());
config->setShowStatusbar(statusBar()->isVisible());