From 1b7d49654623f68942e94789946414b17836f4d6 Mon Sep 17 00:00:00 2001 From: tanyulong2021 Date: Wed, 3 Aug 2022 15:22:07 +0800 Subject: [PATCH] Modified to operate font style only when selected --- src/editPage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editPage.cpp b/src/editPage.cpp index 6315c18..de64389 100755 --- a/src/editPage.cpp +++ b/src/editPage.cpp @@ -385,7 +385,7 @@ void Edit_page::mergeFormatOnWordOrSelection(const QTextCharFormat &format) { QTextCursor cursor = ui->textEdit->textCursor(); if (!cursor.hasSelection()) { - cursor.select(QTextCursor::WordUnderCursor); + // cursor.select(QTextCursor::WordUnderCursor); } cursor.mergeCharFormat(format); ui->textEdit->mergeCurrentCharFormat(format); -- 2.33.0