GH-1652 save all instance settings on launch if instance window is already open

This commit is contained in:
Petr Mrázek
2016-10-28 03:36:29 +02:00
parent dd0e996081
commit 8731318fef
6 changed files with 28 additions and 6 deletions

View File

@ -215,7 +215,7 @@ void PageContainer::currentChanged(const QModelIndex &current)
showPage(current.isValid() ? m_proxyModel->mapToSource(current).row() : -1);
}
bool PageContainer::requestClose(QCloseEvent *event)
bool PageContainer::prepareToClose()
{
for (auto page : m_model->pages())
{

View File

@ -41,7 +41,11 @@ public:
void addButtons(QWidget * buttons);
void addButtons(QLayout * buttons);
bool requestClose(QCloseEvent *event);
/*
* Save any unsaved state and prepare to be closed.
* @return true if everything can be saved, false if there is something that requires attention
*/
bool prepareToClose();
virtual bool selectPage(QString pageId) override;