Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
JuK
Commits
178aee3b
Commit
178aee3b
authored
Mar 28, 2021
by
Michael Pyne
Browse files
tageditor: Speedup startup when Tag Editor is shown.
(cherry picked from commit
506c2ee6
)
parent
a65a4e8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
playlistsplitter.cpp
View file @
178aee3b
...
...
@@ -211,6 +211,22 @@ void PlaylistSplitter::setupLayout()
connect
(
m_playlistBox
,
&
QTreeWidget
::
currentItemChanged
,
this
,
&
PlaylistSplitter
::
slotCurrentPlaylistChanged
);
// Let interested parties know we're ready
connect
(
m_playlistBox
,
&
PlaylistBox
::
startupComplete
,
this
,
[
this
]()
{
this
->
slotEnable
();
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
();
});
m_player
->
setPlaylistInterface
(
m_playlistBox
);
// Let interested parties know we're ready
...
...
@@ -249,10 +265,8 @@ void PlaylistSplitter::setupLayout()
topLayout
->
insertStretch
(
-
1
);
// Force search bar to top while playlistStack hides
topLayout
->
addWidget
(
m_playlistStack
,
1
);
// Now that GUI setup is complete, add some auto-update signals.
connect
(
CollectionList
::
instance
(),
SIGNAL
(
signalCollectionChanged
()),
m_editor
,
SLOT
(
slotUpdateCollection
()));
connect
(
m_playlistStack
,
SIGNAL
(
currentChanged
(
int
)),
this
,
SLOT
(
slotPlaylistChanged
(
int
)));
connect
(
m_playlistStack
,
&
QStackedWidget
::
currentChanged
,
this
,
&
PlaylistSplitter
::
slotPlaylistChanged
);
// Show the collection on startup.
m_playlistBox
->
setCurrentItem
(
m_playlistBox
->
topLevelItem
(
0
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment