From 4031e9a54e647cee9029d45b096a33b40b87c35c Mon Sep 17 00:00:00 2001 From: jkriege2 Date: Thu, 2 Jun 2022 21:42:10 +0200 Subject: [PATCH] bugfixed styling example --- examples/styling/jkqtpstyleplaintextedit.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/styling/jkqtpstyleplaintextedit.cpp b/examples/styling/jkqtpstyleplaintextedit.cpp index 2090fa6aa8..6c06c8d8f9 100644 --- a/examples/styling/jkqtpstyleplaintextedit.cpp +++ b/examples/styling/jkqtpstyleplaintextedit.cpp @@ -312,18 +312,18 @@ void JKQTPStylePlainTextEdit::contextMenuEvent(QContextMenuEvent *event) connect(act, &QAction::triggered, std::bind(std::mem_fn(&JKQTPStylePlainTextEdit::addTransparencyToCurrentLineValue), this, act->text())); menuTrans->addAction(act); } else if (currentLinePartsLower[0].endsWith("font_name")) { - const QStringList splitValue=currentLinePartsLower[1].split('+'); + const QStringList splitValue=currentLineParts[1].split('+'); submenu->setEnabled(true); QMenu* menuDefaultFonts=submenu->addMenu(tr("default fonts ...")); QMenu* menuSystemFonts=submenu->addMenu(tr("system fonts ...")); QMenu* menuAllFOnts=submenu->addMenu(tr("all fonts ...")); QMenu* menuMathFont=submenu->addMenu(tr("add math-fonts specifier ...")); currentValue->setVisible(true); - currentValue->setText(tr("text font: ")+currentLineParts[0]); + currentValue->setText(tr("text font: ")+splitValue[0]); currentValue->setFont(QFont(JKQTMathTextFontSpecifier::transformFontNameAndDecodeSpecialFonts(JKQTMathTextFontSpecifier::fromFontSpec(currentLineParts[1]).fontName()))); if (!JKQTMathTextFontSpecifier::fromFontSpec(currentLineParts[1]).mathFontName().isEmpty()) { currentValue2->setVisible(true); - currentValue2->setText(tr("math font: ")+currentLineParts[1]); + currentValue2->setText(tr("math font: ")+splitValue[1]); currentValue2->setFont(QFont(JKQTMathTextFontSpecifier::transformFontNameAndDecodeSpecialFonts(JKQTMathTextFontSpecifier::fromFontSpec(currentLineParts[1]).mathFontName()))); } QAction* act;