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. 2
      src/mainwindow.cpp

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