From 515ac0b9796b1dc133fc712f87fea88b40908ea7 Mon Sep 17 00:00:00 2001 From: Owen Williams Date: Mon, 14 Feb 2022 14:06:57 -0500 Subject: [PATCH] Eject Undo: address cleanup notes --- src/mixer/baseplayer.h | 2 +- src/mixer/basetrackplayer.cpp | 2 +- src/mixer/playermanager.cpp | 4 ++-- src/mixer/playermanager.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mixer/baseplayer.h b/src/mixer/baseplayer.h index c183a6179652..3b208d6586d6 100644 --- a/src/mixer/baseplayer.h +++ b/src/mixer/baseplayer.h @@ -3,7 +3,7 @@ #include #include -#include "playermanager.h" +#include "mixer/playermanager.h" class BasePlayer : public QObject { Q_OBJECT diff --git a/src/mixer/basetrackplayer.cpp b/src/mixer/basetrackplayer.cpp index 2a4bb0b4227f..8f9126fc8067 100644 --- a/src/mixer/basetrackplayer.cpp +++ b/src/mixer/basetrackplayer.cpp @@ -310,7 +310,7 @@ void BaseTrackPlayerImpl::slotEjectTrack(double v) { } if (!m_pLoadedTrack) { TrackPointer lastEjected = m_pPlayerManager->getLastEjectedTrack(); - if (lastEjected && lastEjected->getId().isValid()) { + if (lastEjected) { slotLoadTrack(lastEjected, false); } return; diff --git a/src/mixer/playermanager.cpp b/src/mixer/playermanager.cpp index da4673a24b53..0f018bd0e4e0 100644 --- a/src/mixer/playermanager.cpp +++ b/src/mixer/playermanager.cpp @@ -600,7 +600,7 @@ Sampler* PlayerManager::getSampler(unsigned int sampler) const { TrackPointer PlayerManager::getLastEjectedTrack() const { if (m_pLibrary) { - return m_pLibrary->trackCollectionManager()->getTrackById(m_pLastEjectedTrackId); + return m_pLibrary->trackCollectionManager()->getTrackById(m_lastEjectedTrackId); } return nullptr; } @@ -748,7 +748,7 @@ void PlayerManager::slotSaveEjectedTrack(TrackPointer track) { VERIFY_OR_DEBUG_ASSERT(track) { return; } - m_pLastEjectedTrackId = track->getId(); + m_lastEjectedTrackId = track->getId(); } void PlayerManager::onTrackAnalysisProgress(TrackId trackId, AnalyzerProgress analyzerProgress) { diff --git a/src/mixer/playermanager.h b/src/mixer/playermanager.h index c688f9df0603..bfcc7368a925 100644 --- a/src/mixer/playermanager.h +++ b/src/mixer/playermanager.h @@ -286,7 +286,7 @@ class PlayerManager : public QObject, public PlayerManagerInterface { TrackAnalysisScheduler::Pointer m_pTrackAnalysisScheduler; - TrackId m_pLastEjectedTrackId; + TrackId m_lastEjectedTrackId; QList m_decks; QList m_samplers;