File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -158,7 +158,8 @@ void PlaylistTabs::addRemovePlaylists()
158
158
159
159
void PlaylistTabs::currentChangedTrigger (int idx)
160
160
{
161
- Playlist::by_index (idx).activate ();
161
+ if (!m_in_update)
162
+ Playlist::by_index (idx).activate ();
162
163
}
163
164
164
165
bool PlaylistTabs::eventFilter (QObject * obj, QEvent * e)
@@ -186,12 +187,15 @@ void PlaylistTabs::renameCurrent()
186
187
187
188
void PlaylistTabs::playlist_activate_cb ()
188
189
{
190
+ m_in_update = true ;
189
191
setCurrentIndex (Playlist::active_playlist ().index ());
190
192
m_tabbar->cancelRename ();
193
+ m_in_update = false ;
191
194
}
192
195
193
196
void PlaylistTabs::playlist_update_cb (Playlist::UpdateLevel global_level)
194
197
{
198
+ m_in_update = true ;
195
199
if (global_level == Playlist::Structure)
196
200
addRemovePlaylists ();
197
201
if (global_level >= Playlist::Metadata)
@@ -201,6 +205,7 @@ void PlaylistTabs::playlist_update_cb(Playlist::UpdateLevel global_level)
201
205
playlistWidget (i)->playlistUpdate ();
202
206
203
207
setCurrentIndex (Playlist::active_playlist ().index ());
208
+ m_in_update = false ;
204
209
}
205
210
206
211
void PlaylistTabs::playlist_position_cb (Playlist list)
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ class PlaylistTabs : public QTabWidget
48
48
private:
49
49
QMenu * m_pl_menu;
50
50
PlaylistTabBar * m_tabbar;
51
+ bool m_in_update = false ;
51
52
52
53
void activateSearch ();
53
54
void addRemovePlaylists ();
You can’t perform that action at this time.
0 commit comments