Skip to content

Commit 63ecab1

Browse files
committed
DEBUG 'LoadSelectedTrack' control, triggered via keyboard
1 parent af08fd1 commit 63ecab1

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

src/library/librarycontrol.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,11 +537,13 @@ void LibraryControl::slotUpdateTrackMenuControl(bool visible) {
537537

538538
void LibraryControl::slotLoadSelectedTrackToGroup(const QString& group, bool play) {
539539
if (!m_pLibraryWidget) {
540+
qWarning() << " ! no WLibrary widget";
540541
return;
541542
}
542543

543544
LibraryView* pActiveView = m_pLibraryWidget->getActiveView();
544545
if (!pActiveView) {
546+
qWarning() << " ! no active view";
545547
return;
546548
}
547549
pActiveView->loadSelectedTrackToGroup(group, play);

src/mixer/basetrackplayer.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,10 @@ void BaseTrackPlayerImpl::loadTrack(TrackPointer pTrack) {
286286
m_pLoadedTrack = std::move(pTrack);
287287
if (!m_pLoadedTrack) {
288288
// nothing to
289+
qWarning() << " ! no track to load";
289290
return;
290291
}
292+
qWarning() << " >> load track";
291293

292294
// Clear loop
293295
// It seems that the trick is to first clear the loop out point, and then
@@ -489,6 +491,7 @@ void BaseTrackPlayerImpl::slotLoadTrack(TrackPointer pNewTrack, bool bPlay) {
489491
auto fileInfo = pNewTrack->getFileInfo();
490492
if (!Sandbox::askForAccess(&fileInfo)) {
491493
// We don't have access.
494+
qWarning() << " ! can't read" << fileInfo.location();
492495
return;
493496
}
494497
}

src/widget/wtracktableview.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,6 +1007,7 @@ void WTrackTableView::activateSelectedTrack() {
10071007
void WTrackTableView::loadSelectedTrackToGroup(const QString& group, bool play) {
10081008
auto indices = selectionModel()->selectedRows();
10091009
if (indices.isEmpty()) {
1010+
qWarning() << " ! indices empty";
10101011
return;
10111012
}
10121013
bool allowLoadTrackIntoPlayingDeck = false;
@@ -1032,6 +1033,7 @@ void WTrackTableView::loadSelectedTrackToGroup(const QString& group, bool play)
10321033
// TODO(XXX): Check for other than just the first preview deck.
10331034
if (group != "[PreviewDeck1]" &&
10341035
ControlObject::get(ConfigKey(group, "play")) > 0.0) {
1036+
qWarning() << " ! not allowed to load to this deck, might be playing";
10351037
return;
10361038
}
10371039
}
@@ -1040,6 +1042,7 @@ void WTrackTableView::loadSelectedTrackToGroup(const QString& group, bool play)
10401042
TrackPointer pTrack;
10411043
if (trackModel &&
10421044
(pTrack = trackModel->getTrack(index))) {
1045+
qWarning() << " > emit loadTrackToPlayer, deck:" << group;
10431046
emit loadTrackToPlayer(pTrack, group, play);
10441047
}
10451048
}

0 commit comments

Comments
 (0)