diff options
Diffstat (limited to 'application/widgets/PageContainer.cpp')
-rw-r--r-- | application/widgets/PageContainer.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/application/widgets/PageContainer.cpp b/application/widgets/PageContainer.cpp index 98de57e8..c8c2b57a 100644 --- a/application/widgets/PageContainer.cpp +++ b/application/widgets/PageContainer.cpp @@ -218,10 +218,9 @@ void PageContainer::currentChanged(const QModelIndex ¤t) bool PageContainer::prepareToClose() { - for (auto page : m_model->pages()) + if(!saveAll()) { - if (!page->apply()) - return false; + return false; } if (m_currentPage) { @@ -229,3 +228,13 @@ bool PageContainer::prepareToClose() } return true; } + +bool PageContainer::saveAll() +{ + for (auto page : m_model->pages()) + { + if (!page->apply()) + return false; + } + return true; +} |