Commit a93d2093 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Attempt to solve subtitle Right to Left languages.

Related to #1519
parent 8e884b1d
......@@ -317,6 +317,9 @@ void SubtitleEdit::updateSubtitle()
if (m_activeSub > -1 && m_model) {
QString txt = subText->toPlainText().trimmed();
txt.replace(QLatin1String("\n\n"), QStringLiteral("\n"));
if (subText->document()->defaultTextOption().textDirection() == Qt::RightToLeft && !txt.startsWith(QChar(0x200E))) {
txt.prepend(QChar(0x200E));
}
m_model->setText(m_activeSub, txt);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment