active indicator working
This commit is contained in:
parent
0795157d5f
commit
6056778856
2 changed files with 5 additions and 12 deletions
|
@ -248,6 +248,7 @@ void CueTrackListWidget::redrawCueTrackList()
|
|||
tableWidget->resizeRowsToContents();
|
||||
tableWidget->scrollToItem(tableWidget->item(selectedIndex, 0));
|
||||
tableWidget->blockSignals(false);
|
||||
emit changeSelectedIndex(selectedIndex);
|
||||
}
|
||||
|
||||
#include <QFile>
|
||||
|
@ -451,7 +452,6 @@ void saveCueTrackToXml(const CueTrack& cueTrack, const QString& filename) {
|
|||
xmlWriter.writeTextElement("entryPoint", QString::number(cueTrack.entryPoint));
|
||||
xmlWriter.writeTextElement("exitPoint", QString::number(cueTrack.exitPoint));
|
||||
xmlWriter.writeTextElement("audioLayer", QString::number(cueTrack.audioLayer));
|
||||
xmlWriter.writeTextElement("active", cueTrack.active ? "true" : "false");
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
xmlWriter.writeEndDocument();
|
||||
|
@ -514,8 +514,6 @@ CueTrack loadCueTrackFromXml(const QString& filename) {
|
|||
cueTrack.exitPoint = xmlReader.readElementText().toInt();
|
||||
} else if (elementName == "audioLayer") {
|
||||
cueTrack.audioLayer = xmlReader.readElementText().toInt();
|
||||
} else if (elementName == "active") {
|
||||
cueTrack.active = xmlReader.readElementText() == "true";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -545,7 +543,6 @@ void CueTrackListWidget::cueTrackAtEnd(int layer)
|
|||
{
|
||||
cur->active = false;
|
||||
}
|
||||
layer--;
|
||||
}
|
||||
redrawCueTrackList();
|
||||
}
|
||||
|
|
|
@ -34,16 +34,11 @@ void ShowPlayer::go()
|
|||
if (current->audioLayer < 0)
|
||||
return;
|
||||
ui->activeCueLabel->setText(current->name.data());
|
||||
for (int i = 0; i < MAX_LAYERS; i++) {
|
||||
if (layersUsed[i] == -1) {
|
||||
layersUsed[i] = current->userNumber;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!current->filePath.empty())
|
||||
emit uiLoadMedia(current->audioLayer, current->filePath.data());
|
||||
updateTrackStateInEngine(current);
|
||||
emit uiPlaybackChanged(current->audioLayer, current->status);
|
||||
ui->cueListWidget->cueTrackAtEnd(current->audioLayer);
|
||||
switch (current->status) {
|
||||
case Status::PlayingOnce:
|
||||
case Status::PlayingLoop:
|
||||
|
@ -51,6 +46,7 @@ void ShowPlayer::go()
|
|||
case Status::PlayingFolderLoop:
|
||||
case Status::PlayingFolderRandom:
|
||||
current->active = true;
|
||||
layersUsed[current->audioLayer] = current->userNumber;
|
||||
break;
|
||||
default:
|
||||
current->active = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue