aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/qmmpui/cueeditor.cpp7
-rw-r--r--src/qmmpui/detailsdialog.cpp13
2 files changed, 14 insertions, 6 deletions
diff --git a/src/qmmpui/cueeditor.cpp b/src/qmmpui/cueeditor.cpp
index 60a3c9b4a..8366e5024 100644
--- a/src/qmmpui/cueeditor.cpp
+++ b/src/qmmpui/cueeditor.cpp
@@ -76,6 +76,13 @@ CueEditor::CueEditor(MetaDataModel *model, const TrackInfo &info, QWidget *paren
m_lastDir = settings.value("CueEditor/last_dir", QDir::homePath()).toString();
m_editable = m_model && (m_model->dialogHints() & MetaDataModel::IsCueEditable) && !m_model->isReadOnly();
new CueSyntaxHighlighter(m_ui->plainTextEdit->document());
+
+ if(!m_editable)
+ {
+ m_ui->deleteButton->setEnabled(false);
+ m_ui->loadButton->setEnabled(false);
+ m_ui->plainTextEdit->setReadOnly(true);
+ }
}
CueEditor::~CueEditor()
diff --git a/src/qmmpui/detailsdialog.cpp b/src/qmmpui/detailsdialog.cpp
index e9dd55352..caaed7a4d 100644
--- a/src/qmmpui/detailsdialog.cpp
+++ b/src/qmmpui/detailsdialog.cpp
@@ -249,12 +249,6 @@ void DetailsDialog::updatePage()
m_ui->tabWidget->addTab(coverEditor, tr("Cover"));
}
- if(m_metaDataModel && (m_metaDataModel->dialogHints() & MetaDataModel::IsCueEditable))
- {
- CueEditor *cueEditor = new CueEditor(m_metaDataModel, m_info, this);
- m_ui->tabWidget->addTab(cueEditor, "CUE");
- }
-
if(m_metaDataModel)
{
for(TagModel *tagModel : m_metaDataModel->tags())
@@ -271,7 +265,14 @@ void DetailsDialog::updatePage()
textEdit->setPlainText(item.value().toString());
m_ui->tabWidget->addTab(textEdit, item.name());
}
+
+ if(m_metaDataModel->dialogHints() & MetaDataModel::IsCueEditable)
+ {
+ CueEditor *cueEditor = new CueEditor(m_metaDataModel, m_info, this);
+ m_ui->tabWidget->addTab(cueEditor, "CUE");
+ }
}
+
printInfo();
}