mirror of
git://slackware.nl/current.git
synced 2025-01-06 05:25:20 +01:00
d31c50870d
Thu Jun 30 20:26:57 UTC 2016 Slackware 14.2 x86_64 stable is released! The long development cycle (the Linux community has lately been living in "interesting times", as they say) is finally behind us, and we're proud to announce the release of Slackware 14.2. The new release brings many updates and modern tools, has switched from udev to eudev (no systemd), and adds well over a hundred new packages to the system. Thanks to the team, the upstream developers, the dedicated Slackware community, and everyone else who pitched in to help make this release a reality. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Have fun! :-)
31 lines
1.4 KiB
Diff
31 lines
1.4 KiB
Diff
diff --git a/src/declarativeitems/lessonpainter.cpp b/src/declarativeitems/lessonpainter.cpp
|
|
index dc8fc61..2c56c0c 100644
|
|
--- a/src/declarativeitems/lessonpainter.cpp
|
|
+++ b/src/declarativeitems/lessonpainter.cpp
|
|
@@ -236,8 +236,7 @@ void LessonPainter::updateTrainingStatus()
|
|
const QString referenceLine = m_trainingLineCore->referenceLine();
|
|
const QString actualLine = m_trainingLineCore->actualLine();
|
|
const QString preeditString = m_trainingLineCore->preeditString();
|
|
- const QTextBlock block = m_doc->findBlockByNumber(m_currentLine + 1);
|
|
- const int blockPosition = block.position();
|
|
+ const int blockPosition = m_doc->findBlockByNumber(m_currentLine + 1).position();
|
|
|
|
for (int linePos = 0; linePos < referenceLine.length(); linePos++)
|
|
{
|
|
@@ -257,8 +256,14 @@ void LessonPainter::updateTrainingStatus()
|
|
|
|
cursor.setPosition(charPosition, QTextCursor::MoveAnchor);
|
|
cursor.setPosition(charPosition + 1, QTextCursor::KeepAnchor);
|
|
- cursor.deleteChar();
|
|
- cursor.insertText(QString(displayedChar), charFormat);
|
|
+
|
|
+ /* QUICKFIX: Using the charFormat to decide whether a char must be repainted or not.
|
|
+ * Not nice but quite efficient ... */
|
|
+ if (cursor.charFormat() != charFormat)
|
|
+ {
|
|
+ cursor.deleteChar();
|
|
+ cursor.insertText(QString(displayedChar), charFormat);
|
|
+ }
|
|
}
|
|
|
|
invalidateImageCache();
|