Editor: bug fix for smart table caused by QString.arg()

This commit is contained in:
Le Tan 2019-06-10 20:44:41 +08:00
parent a9fbabb1e9
commit 09df438f2e
2 changed files with 6 additions and 5 deletions

View File

@ -334,7 +334,7 @@ editor_font_family=
enable_smart_table=true
; Interval (milliseconds) to format table
table_format_interval=3000
table_format_interval=2000
[export]
; Path of the wkhtmltopdf tool

View File

@ -2,6 +2,7 @@
#include <QTextDocument>
#include <QTextLayout>
#include <QDebug>
#include "veditor.h"
@ -465,10 +466,10 @@ QString VTable::generateFormattedText(const QString &p_core,
rightSpaces = 0;
}
return QString("%1 %2%3%4 ").arg(c_borderChar)
.arg(QString(leftSpaces, ' '))
.arg(p_core)
.arg(QString(rightSpaces, ' '));
return QString("%1 %2%3%4 ").arg(c_borderChar,
QString(leftSpaces, ' '),
p_core,
QString(rightSpaces, ' '));
}
VTable::Alignment VTable::getColumnAlignment(int p_idx) const