r22096 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Sun Jul 2 11:42:54 UTC 2017


Author: jghali
Date: Sun Jul  2 11:42:54 2017
New Revision: 22096

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22096
Log:
#14891: Style replacement isn't correct

Modified:
    branches/Version14x/Scribus/scribus/search.cpp

Modified: branches/Version14x/Scribus/scribus/search.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22096&path=/branches/Version14x/Scribus/scribus/search.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/search.cpp	(original)
+++ branches/Version14x/Scribus/scribus/search.cpp	Sun Jul  2 11:42:54 2017
@@ -707,6 +707,9 @@
 						Item->itemText.replaceChar(ReplStart+cs, repl[cs]);
 					Item->itemText.removeChars(ReplStart+cs, sear.length() - cs);
 				}
+				Item->itemText.deselectAll();
+				if (repl.length() > 0)
+					Item->itemText.select(ReplStart, repl.length());
 			}
 		}
 		if (RStyle->isChecked())
@@ -735,7 +738,7 @@
 			Doc->itemSelection_SetFont(RFontVal->currentText());
 		if (RSize->isChecked())
 			Doc->itemSelection_SetFontSize(qRound(RSizeVal->value() * 10.0));
-		if (REffect->isChecked())
+		if (REffect->isChecked() && (Item->itemText.lengthOfSelection() > 0))
 		{
 #ifndef NLS_PROTO
 			int s = REffVal->getStyle();




More information about the scribus-commit mailing list