From 8206d078aa3b41671c50e2ab428cdd5c2d924aaf Mon Sep 17 00:00:00 2001 From: ronso0 Date: Sat, 4 Apr 2020 16:33:57 +0200 Subject: make Anylysis button checkable, unchecked by default --- src/library/dlganalysis.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/library/dlganalysis.cpp') diff --git a/src/library/dlganalysis.cpp b/src/library/dlganalysis.cpp index 1a9796d4e1..8ffe6f8938 100644 --- a/src/library/dlganalysis.cpp +++ b/src/library/dlganalysis.cpp @@ -63,6 +63,7 @@ DlgAnalysis::DlgAnalysis(QWidget* parent, &QPushButton::clicked, this, &DlgAnalysis::analyze); + pushButtonAnalyze->setEnabled(false); connect(pushButtonSelectAll, &QPushButton::clicked, @@ -165,10 +166,11 @@ void DlgAnalysis::slotAnalysisActive(bool bActive) { //qDebug() << this << "slotAnalysisActive" << bActive; m_bAnalysisActive = bActive; if (bActive) { - pushButtonAnalyze->setEnabled(true); + pushButtonAnalyze->setChecked(true); pushButtonAnalyze->setText(tr("Stop Analysis")); labelProgress->setEnabled(true); } else { + pushButtonAnalyze->setChecked(false); pushButtonAnalyze->setText(tr("Analyze")); labelProgress->setText(""); labelProgress->setEnabled(false); -- cgit v1.2.3 From 4030dbdea50303eb25a71597ad6113b38b42be30 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Tue, 7 Apr 2020 03:27:40 +0200 Subject: delay loading Analysis table until it's shown According to the removed ToDo, doing this at feature init would extend the skin loading time. --- src/library/dlganalysis.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/library/dlganalysis.cpp') diff --git a/src/library/dlganalysis.cpp b/src/library/dlganalysis.cpp index 8ffe6f8938..d43f382edf 100644 --- a/src/library/dlganalysis.cpp +++ b/src/library/dlganalysis.cpp @@ -54,10 +54,8 @@ DlgAnalysis::DlgAnalysis(QWidget* parent, &QRadioButton::clicked, this, &DlgAnalysis::showAllSongs); - - // TODO(rryan): This triggers a library search before the UI has even - // started up. Accounts for 0.2% of skin creation time. Get rid of this! - radioButtonRecentlyAdded->click(); + // Don't click those radio buttons now reduce skin loading time. + // 'RecentlyAdded' is clicked in onShow() connect(pushButtonAnalyze, &QPushButton::clicked, @@ -92,6 +90,10 @@ DlgAnalysis::DlgAnalysis(QWidget* parent, } void DlgAnalysis::onShow() { + if (!radioButtonRecentlyAdded->isChecked() && + !radioButtonAllSongs->isChecked()) { + radioButtonRecentlyAdded->click(); + } // Refresh table // There might be new tracks dropped to other views m_pAnalysisLibraryTableModel->select(); -- cgit v1.2.3