From 624f936ac605fdfc9327a3fc28be43da5b67135b Mon Sep 17 00:00:00 2001 From: craig Date: Tue, 3 Jan 2012 21:09:26 +0000 Subject: #9876: Apply patch for char style application, extend to cover all cases git-svn-id: svn://scribus.net/branches/Version14x/Scribus@17177 11d20701-8431-0410-a711-e3c959e3b870 --- scribus/scribusdoc.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'scribus/scribusdoc.cpp') diff --git a/scribus/scribusdoc.cpp b/scribus/scribusdoc.cpp index 8c88e43..746eacf 100644 --- a/scribus/scribusdoc.cpp +++ b/scribus/scribusdoc.cpp @@ -6311,7 +6311,8 @@ void ScribusDoc::itemSelection_ApplyCharStyle(const CharStyle & newStyle, Select 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 @@ void ScribusDoc::itemSelection_SetCharStyle(const CharStyle & newStyle, Selectio 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 @@ void ScribusDoc::itemSelection_EraseCharStyle(Selection* customSelection) 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; -- cgit