Commit 506c2ee6 authored by Michael Pyne's avatar Michael Pyne
Browse files

tageditor: Speedup startup when Tag Editor is shown.

parent 929ef9cb
Pipeline #55843 failed with stage
in 10 minutes and 58 seconds
...@@ -224,6 +224,14 @@ void PlaylistSplitter::setupLayout() ...@@ -224,6 +224,14 @@ void PlaylistSplitter::setupLayout()
this->slotEnable(); this->slotEnable();
this->setFocus(); this->setFocus();
// Do this after initial playlist setup otherwise we'll waste
// a lot of time starting up with the tag editor trying to
// re-update after every item is loaded.
connect(CollectionList::instance(),
&CollectionList::signalCollectionChanged,
m_editor,
&TagEditor::slotUpdateCollection);
emit guiReady(); emit guiReady();
}); });
...@@ -262,9 +270,6 @@ void PlaylistSplitter::setupLayout() ...@@ -262,9 +270,6 @@ void PlaylistSplitter::setupLayout()
topLayout->insertStretch(-1); // Force search bar to top while playlistStack hides topLayout->insertStretch(-1); // Force search bar to top while playlistStack hides
topLayout->addWidget(m_playlistStack, 1); topLayout->addWidget(m_playlistStack, 1);
// Now that GUI setup is complete, add some auto-update signals.
connect(CollectionList::instance(), &CollectionList::signalCollectionChanged,
m_editor, &TagEditor::slotUpdateCollection);
connect(m_playlistStack, &QStackedWidget::currentChanged, connect(m_playlistStack, &QStackedWidget::currentChanged,
this, &PlaylistSplitter::slotPlaylistChanged); this, &PlaylistSplitter::slotPlaylistChanged);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment