r24122 by jghali - Fix offset error when extracting sentence of spellchecked word

scribus-commit scribus-commit at lists.scribus.net
Thu Oct 29 13:47:19 UTC 2020


Author: jghali
Date: Thu Oct 29 13:47:19 2020
New Revision: 24122

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24122
Log:
Fix offset error when extracting sentence of spellchecked word

Modified:
    trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspelldialog.cpp

Modified: trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspelldialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24122&path=/trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspelldialog.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspelldialog.cpp	(original)
+++ trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspelldialog.cpp	Thu Oct 29 13:47:19 2020
@@ -114,7 +114,7 @@
 	updateSuggestions(currWF.replacements);
 
 	int sentencePos = 0;
-	QString sentence(m_iText->sentence(currWF.start, sentencePos));
+	QString sentence(m_iText->sentence(currWF.start + currWF.changeOffset, sentencePos));
 	sentence.insert(currWF.end - sentencePos + currWF.changeOffset, "</b></font>");
 	sentence.insert(currWF.start - sentencePos + currWF.changeOffset, "<font color=red><b>");
 	sentenceTextEdit->setText(sentence);




More information about the scribus-commit mailing list