summaryrefslogtreecommitdiffstats
path: root/scribus/scribusdoc.cpp
diff options
context:
space:
mode:
authorcraig <craig@11d20701-8431-0410-a711-e3c959e3b870>2012-01-03 21:09:26 +0000
committercraig <craig@11d20701-8431-0410-a711-e3c959e3b870>2012-01-03 21:09:26 +0000
commit624f936ac605fdfc9327a3fc28be43da5b67135b (patch)
tree5b82b31dea8e80bbae9d92e403570d54e95022ac /scribus/scribusdoc.cpp
parent19bd1b6a5b0a55913dbae188eadbeed1d36238ce (diff)
downloadscribus-624f936ac605fdfc9327a3fc28be43da5b67135b.tar.gz
scribus-624f936ac605fdfc9327a3fc28be43da5b67135b.tar.xz
scribus-624f936ac605fdfc9327a3fc28be43da5b67135b.zip
#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
Diffstat (limited to 'scribus/scribusdoc.cpp')
-rw-r--r--scribus/scribusdoc.cpp9
1 files changed, 6 insertions, 3 deletions
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;