r17177 by craig - #9876: Apply patch for char style application, extend to cover all cases

scribus-commit scribus-commit at lists.scribus.net
Tue Jan 3 21:09:26 UTC 2012


Author: craig
Date: Tue Jan  3 21:09:26 2012
New Revision: 17177

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17177
Log:
#9876: Apply patch for char style application, extend to cover all cases

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

Modified: branches/Version14x/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17177&path=/branches/Version14x/Scribus/scribus/scribus.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/scribus.cpp (original)
+++ branches/Version14x/Scribus/scribus/scribus.cpp Tue Jan  3 21:09:26 2012
@@ -7069,7 +7069,7 @@
 	PageItem *currItem = doc->m_Selection->itemAt(0);
 	if (currItem->asTextFrame())
 		currItem->itemTextSaxed = currItem->getItemTextSaxed(doc->appMode == modeEdit? PageItem::SELECTION : PageItem::FRAME);
-	qDebug() << "setNewFont" << currItem->HasSel;
+//	qDebug() << "setNewFont" << currItem->HasSel;
 	doc->itemSelection_SetFont(nf2);
 	if (currItem->asTextFrame())
 		currItem->asTextFrame()->updateUndo(currItem->HasSel? PageItem::PARAMSEL : PageItem::PARAMFULL);

Modified: branches/Version14x/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17177&path=/branches/Version14x/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/scribusdoc.cpp (original)
+++ branches/Version14x/Scribus/scribus/scribusdoc.cpp Tue Jan  3 21:09:26 2012
@@ -6311,7 +6311,8 @@
 				else
 				{
 					start = qMax(currItem->firstInFrame(), currItem->itemText.cursorPosition());
-					length = (start + 1) < currItem->itemText.length()? 1 : 0;
+//9876					length = (start + 1) < currItem->itemText.length()? 1 : 0;
+					length = start < currItem->itemText.length() ? 1 : 0;
 				}
 			}
 			currItem->itemText.applyCharStyle(start, qMax(0, length), newStyle);
@@ -6370,7 +6371,8 @@
 				else
 				{
 					start = qMax(currItem->firstInFrame(), currItem->itemText.cursorPosition());
-					length = (start + 1) < currItem->itemText.length()? 1 : 0;
+//9876					length = (start + 1) < currItem->itemText.length()? 1 : 0;
+					length = start < currItem->itemText.length()? 1 : 0;
 				}
 			}
 			currItem->itemText.setCharStyle(start, length, newStyle);
@@ -6428,7 +6430,8 @@
 				else
 				{
 					start = qMax(currItem->firstInFrame(), currItem->itemText.cursorPosition());
-					length = (start + 1) < currItem->itemText.length()? 1 : 0;
+//9876					length = (start + 1) < currItem->itemText.length()? 1 : 0;
+					length = start < currItem->itemText.length() ? 1 : 0;
 				}
 			}
 			QString lastParent;




More information about the scribus-commit mailing list