# Conflicts:
#	lib/jkqtmathtext/jkqtmathtext.cpp
#	lib/jkqtmathtext/jkqtmathtext.h
This commit is contained in:
jkriege2 2022-08-16 23:11:44 +02:00
commit b5459a90d9
2 changed files with 5 additions and 5 deletions

View File

@ -2262,14 +2262,14 @@ JKQTMathTextNode *JKQTMathText::getParsedNode() const {
bool JKQTMathText::parse(const QString& text, ParseOptions options){
QString ntext=text;
if (options.testFlag(StartWithMathMode)) ntext=QString("$")+ntext+QString("$");
if (options.testFlag(AddSpaceBeforeAndAfter)) ntext=QString("\\;")+ntext+QString("\\;");
QString ntext;
if (options.testFlag(StartWithMathMode)) ntext=QString("$")+text+QString("$");
if (options.testFlag(AddSpaceBeforeAndAfter)) ntext=QString("\\;")+text+QString("\\;");
else ntext=text;
if (parsedNode && parseString==ntext) return true;
if (parsedNode!=nullptr) delete parsedNode;
//std::cout<<"JKQTMathText::parse('"<<ntext.toStdString()<<"', options="<<std::hex<<static_cast<int>(options)<<")\n";
parseString=ntext;
currentTokenID=-1;

View File

@ -233,7 +233,7 @@ class JKQTMATHTEXT_LIB_EXPORT JKQTMathText : public QObject {
*/
bool parse(const QString &text, ParseOptions options=DefaultParseOptions);
/** \brief get the size of the drawn representation. returns \c QSizeF(0,0) if no text has been parsed. */
/** \brief get the size of the drawn representation. returns an invalid size if no text has been parsed. */
QSizeF getSize(QPainter& painter);
/** \brief get the rounded (using ceil) to an integer size of the drawn representation. returns \c QSize(0,0) if no text has been parsed. */
QSize getIntSize(QPainter& painter);