diff --git a/src/statistics/statisticsmainwindow.cpp b/src/statistics/statisticsmainwindow.cpp --- a/src/statistics/statisticsmainwindow.cpp +++ b/src/statistics/statisticsmainwindow.cpp @@ -54,12 +54,11 @@ //m_ui->caption->setText(i18nc("caption for an overview of the confidence levels for a document" // "Statistics for \"%1\"", m_doc->title())); m_statisticsModel = new StatisticsModel(this); - setDocument(doc); initActions(); initPracticeModeSelection(); - initLanguages(); initPracticeMode(); + languagesChanged(); KConfigGroup cfg(KSharedConfig::openConfig(QStringLiteral("parleyrc")), objectName()); applyMainWindowSettings(cfg); @@ -87,6 +86,7 @@ { m_doc = doc; m_statisticsModel->setDocument(doc); + initLanguages(); m_ui->lessonStatistics->setModel(m_statisticsModel); m_ui->lessonStatistics->restoreExpandedStatus(); m_ui->lessonStatistics->resizeColumnToContents(0); @@ -179,8 +179,6 @@ connect(m_ui->learnedLanguage, SIGNAL(currentIndexChanged(int)), SLOT(languagesChanged())); connect(m_ui->knownLanguage, SIGNAL(currentIndexChanged(int)), SLOT(languagesChanged())); - - languagesChanged(); } void StatisticsMainWindow::languagesChanged()