r22095 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Sun Jul 2 11:41:39 UTC 2017


Author: jghali
Date: Sun Jul  2 11:41:39 2017
New Revision: 22095

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

Modified:
    trunk/Scribus/scribus/ui/search.cpp

Modified: trunk/Scribus/scribus/ui/search.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22095&path=/trunk/Scribus/scribus/ui/search.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/search.cpp	(original)
+++ trunk/Scribus/scribus/ui/search.cpp	Sun Jul  2 11:41:39 2017
@@ -711,6 +711,9 @@
 						m_item->itemText.replaceChar(m_replStart+cs, repl[cs]);
 					m_item->itemText.removeChars(m_replStart+cs, sear.length() - cs);
 				}
+				m_item->itemText.deselectAll();
+				if (repl.length() > 0)
+					m_item->itemText.select(m_replStart, repl.length());
 			}
 		}
 		if (RStyle->isChecked())
@@ -739,7 +742,7 @@
 			m_doc->itemSelection_SetFont(RFontVal->currentText());
 		if (RSize->isChecked())
 			m_doc->itemSelection_SetFontSize(qRound(RSizeVal->value() * 10.0));
-		if (REffect->isChecked())
+		if (REffect->isChecked() && (m_item->itemText.lengthOfSelection() > 0))
 		{
 			int s = REffVal->getStyle() & ScStyle_UserStyles;
 			m_doc->currentStyle.charStyle().setFeatures(static_cast<StyleFlag>(s).featureList()); // ???




More information about the scribus-commit mailing list