aboutsummaryrefslogtreecommitdiff
path: root/src/qmmpui/cueeditor.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2021-02-07 21:34:50 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2021-02-07 21:34:50 +0000
commit15629f11ad6e82bcb10cd5a71d0e09684caa7965 (patch)
treec3ffeb1186b099bfef87105c00bf8679777bbd4e /src/qmmpui/cueeditor.cpp
parentc77a6eaa02b2b982a9440a2505305a96aecfd7af (diff)
downloadqmmp-15629f11ad6e82bcb10cd5a71d0e09684caa7965.tar.gz
qmmp-15629f11ad6e82bcb10cd5a71d0e09684caa7965.tar.bz2
qmmp-15629f11ad6e82bcb10cd5a71d0e09684caa7965.zip
fixed cue tracks updating
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9703 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui/cueeditor.cpp')
-rw-r--r--src/qmmpui/cueeditor.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/qmmpui/cueeditor.cpp b/src/qmmpui/cueeditor.cpp
index 221abee94..451fa6a77 100644
--- a/src/qmmpui/cueeditor.cpp
+++ b/src/qmmpui/cueeditor.cpp
@@ -35,6 +35,7 @@ CueEditor::CueEditor(MetaDataModel *model, const TrackInfo &info, QWidget *paren
{
m_ui->setupUi(this);
m_ui->plainTextEdit->setPlainText(model->cue());
+ m_parser.loadData(model->cue().toUtf8());
QSettings settings(Qmmp::configFile(), QSettings::IniFormat);
m_lastDir = settings.value("CueEditor/last_dir", QDir::homePath()).toString();
m_editable = m_model && (m_model->dialogHints() & MetaDataModel::IsCueEditable) && !m_model->isReadOnly();
@@ -54,11 +55,13 @@ void CueEditor::save()
if(data.isEmpty())
{
m_model->removeCue();
+ m_parser.clear();
}
else
{
data.append(QChar::LineFeed);
m_model->setCue(data);
+ m_parser.loadData(data.toUtf8());
}
}
@@ -67,6 +70,11 @@ bool CueEditor::isEditable() const
return m_editable;
}
+int CueEditor::trackCount() const
+{
+ return m_parser.count();
+}
+
void CueEditor::on_loadButton_clicked()
{
QString path = FileDialog::getOpenFileName(this, tr("Open CUE File"),