0.8.4
+ * Improve detection of locale issues (default to POSIX when there is a locale conflict on the system)
+ * Improve timeline operation for small clips (disable resizing, only allow move)
* Add background color parameter to "Rotate" and "Pan and Zoom" effects
* Allow to scroll using the mouse wheel in monitor editing scene
* Zoom to mouse when using CTRL + mouse wheel in monitor editing scene
if (mlt.hasAttribute("LC_NUMERIC")) {
// Set locale for the document
- QString newLocale = setlocale(LC_NUMERIC, mlt.attribute("LC_NUMERIC").toUtf8().constData());
+ const QString newLocale = setlocale(LC_NUMERIC, mlt.attribute("LC_NUMERIC").toUtf8().constData());
documentLocale = QLocale(mlt.attribute("LC_NUMERIC"));
// Make sure Qt locale and C++ locale have the same numeric separator, might not be the case
documentLocale.setNumberOptions(QLocale::OmitGroupSeparator);
if (documentLocale.decimalPoint() != QLocale().decimalPoint()) {
// If loading an older MLT file without LC_NUMERIC, set locale to C which was previously the default
- if (!mlt.hasAttribute("LC_NUMERIC")) setlocale(LC_NUMERIC, "C");
+ if (!mlt.hasAttribute("LC_NUMERIC")) {
+ setlocale(LC_NUMERIC, "C");
+ }
QLocale::setDefault(documentLocale);
// locale conversion might need to be redone
- initEffects::parseEffectFiles();
+ initEffects::parseEffectFiles(setlocale(LC_NUMERIC, NULL));
}
bool ok;
#include <QDir>
#include <QIcon>
+#include "locale.h"
+
initEffectsThumbnailer::initEffectsThumbnailer() :
QThread()
{
}
//static
-void initEffects::parseEffectFiles()
+void initEffects::parseEffectFiles(const QString &locale)
{
QStringList::Iterator more;
QStringList::Iterator it;
return;
}
+ // Warning: Mlt::Factory::init() resets the locale to the default system value, make sure we keep correct locale
+ if (!locale.isEmpty()) setlocale(LC_NUMERIC, locale.toUtf8().constData());
+
// Retrieve the list of MLT's available effects.
Mlt::Properties *filters = repository->filters();
QStringList filtersList;
* It checks for all available effects and transitions, removes blacklisted
* ones, calls fillTransitionsList() and parseEffectFile() to fill the lists
* (with sorted, unique items) and then fills the global lists. */
- static void parseEffectFiles();
+ static void parseEffectFiles(const QString &locale = QString());
static void refreshLumas();
static QDomDocument createDescriptionFromMlt(Mlt::Repository* repository, const QString& type, const QString& name);
static QDomDocument getUsedCustomEffects(QMap <QString, QString> effectids);
systemLocale.setNumberOptions(QLocale::OmitGroupSeparator);
QLocale::setDefault(systemLocale);
// locale conversion might need to be redone
- initEffects::parseEffectFiles();
+ initEffects::parseEffectFiles(setlocale(LC_NUMERIC, NULL));
}
*openBackup = false;