Remove config before writing; fix re-writing config

This commit is contained in:
Moritz Bunkus 2012-04-15 15:40:02 +02:00
parent b41b61ad24
commit baec7b0304

View File

@ -2,6 +2,7 @@
#include "mkvtoolnix-gui/mux_config.h"
#include <QFile>
#include <QStringList>
MuxConfig::MuxConfig()
@ -121,7 +122,8 @@ MuxConfig::save(QString const &fileName) {
if (m_configFileName.isEmpty())
return;
QSettings settings{fileName, QSettings::IniFormat};
QFile::remove(m_configFileName);
QSettings settings{m_configFileName, QSettings::IniFormat};
save(settings);
}