diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2011-03-20 18:00:01 -0400 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2011-03-20 18:00:01 -0400 |
commit | 434f3f9a738ce91cd8bab92c166d1a4e8a430450 (patch) | |
tree | 576311346cb77d71cff9587e43d258e80ef5360f | |
parent | Don't display open box if there ain't nothing to open. (diff) | |
download | Author-master.tar.xz Author-master.zip |
-rw-r--r-- | Introduction.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Introduction.cpp b/Introduction.cpp index 1f5550f..d8bfc2a 100644 --- a/Introduction.cpp +++ b/Introduction.cpp @@ -61,7 +61,15 @@ Introduction::Introduction(QWidget *parent) : layout->addWidget(newCompositionBox); QSettings s; - if (!s.childGroups().isEmpty()) { + bool hasExisting = false; + foreach (const QString &title, s.childGroups()) { + const QString key = QString("%1/lastModified").arg(title); + if (s.contains(key)) { + hasExisting = true; + break; + } + } + if (hasExisting) { m_existingCompositionBox = new QGroupBox(tr("Resume an Existing Composition")); QVBoxLayout *existingCompositionBoxLayout = new QVBoxLayout; existingCompositionBoxLayout->setSpacing(0); |