--- story.cpp	2007-04-23 16:18:26.000000000 -0500
+++ story.cpp.loopinvert.cpp	2007-04-24 16:27:23.000000000 -0500
@@ -3346,9 +3346,9 @@
 		if (Editor->StyledText.at(pa)->count() > 0)
 		{
 			chars = Editor->StyledText.at(pa);
-			for (uint s = 0; s < chars->count(); ++s)
+			if (Editor->currentParaStyle > 4)
 			{
-				if (Editor->currentParaStyle > 4)
+				for (uint s = 0; s < chars->count(); ++s)
 				{
 					if (!currDoc->docParagraphStyles[Editor->currentParaStyle].Font.isEmpty())
 					{
@@ -3368,26 +3368,33 @@
 						chars->at(s)->cstrikepos = currDoc->docParagraphStyles[Editor->currentParaStyle].txtStrikePos;
 						chars->at(s)->cstrikewidth = currDoc->docParagraphStyles[Editor->currentParaStyle].txtStrikeWidth;
 					}
+					chars->at(s)->cab = Editor->currentParaStyle;
 				}
-				if ((Editor->currentParaStyle < 5) && (chars->at(s)->cab > 4))
+			}
+			else
+			{
+				for (uint s = 0; s < chars->count(); ++s)
 				{
-					chars->at(s)->ccolor = currItem->TxtFill;
-					chars->at(s)->cshade = currItem->ShTxtFill;
-					chars->at(s)->cstroke = currItem->TxtStroke;
-					chars->at(s)->cshade2 = currItem->ShTxtStroke;
-					chars->at(s)->cfont = currItem->font();
-					chars->at(s)->csize = currItem->fontSize();
-					chars->at(s)->cstyle &= ~1919;
-					chars->at(s)->cstyle |= currItem->TxTStyle;
-					chars->at(s)->cshadowx = currItem->TxtShadowX;
-					chars->at(s)->cshadowy = currItem->TxtShadowY;
-					chars->at(s)->coutline = currItem->TxtOutline;
-					chars->at(s)->cunderpos = currItem->TxtUnderPos;
-					chars->at(s)->cunderwidth = currItem->TxtUnderWidth;
-					chars->at(s)->cstrikepos = currItem->TxtStrikePos;
-					chars->at(s)->cstrikewidth = currItem->TxtStrikeWidth;
+					if (chars->at(s)->cab > 4)
+					{
+						chars->at(s)->ccolor = currItem->TxtFill;
+						chars->at(s)->cshade = currItem->ShTxtFill;
+						chars->at(s)->cstroke = currItem->TxtStroke;
+						chars->at(s)->cshade2 = currItem->ShTxtStroke;
+						chars->at(s)->cfont = currItem->font();
+						chars->at(s)->csize = currItem->fontSize();
+						chars->at(s)->cstyle &= ~1919;
+						chars->at(s)->cstyle |= currItem->TxTStyle;
+						chars->at(s)->cshadowx = currItem->TxtShadowX;
+						chars->at(s)->cshadowy = currItem->TxtShadowY;
+						chars->at(s)->coutline = currItem->TxtOutline;
+						chars->at(s)->cunderpos = currItem->TxtUnderPos;
+						chars->at(s)->cunderwidth = currItem->TxtUnderWidth;
+						chars->at(s)->cstrikepos = currItem->TxtStrikePos;
+						chars->at(s)->cstrikewidth = currItem->TxtStrikeWidth;
+					}
+					chars->at(s)->cab = Editor->currentParaStyle;
 				}
-				chars->at(s)->cab = Editor->currentParaStyle;
 			}
 			Editor->updateFromChars(pa);
 		}
@@ -3498,9 +3505,9 @@
 			if (Editor->StyledText.at(pa)->count() > 0)
 			{
 				chars = Editor->StyledText.at(pa);
-				for (uint s = 0; s < chars->count(); ++s)
+				if (Editor->currentParaStyle > 4)
 				{
-					if (Editor->currentParaStyle > 4)
+					for (uint s = 0; s < chars->count(); ++s)
 					{
 						if (!currDoc->docParagraphStyles[Editor->currentParaStyle].Font.isEmpty())
 						{
@@ -3520,26 +3527,33 @@
 							chars->at(s)->cstrikepos = currDoc->docParagraphStyles[Editor->currentParaStyle].txtStrikePos;
 							chars->at(s)->cstrikewidth = currDoc->docParagraphStyles[Editor->currentParaStyle].txtStrikeWidth;
 						}
+						chars->at(s)->cab = Editor->currentParaStyle;
 					}
-					if ((Editor->currentParaStyle < 5) && (chars->at(s)->cab > 4))
+				}
+				else
+				{
+					for (uint s = 0; s < chars->count(); ++s)
 					{
-						chars->at(s)->ccolor = currItem->TxtFill;
-						chars->at(s)->cshade = currItem->ShTxtFill;
-						chars->at(s)->cstroke = currItem->TxtStroke;
-						chars->at(s)->cshade2 = currItem->ShTxtStroke;
-						chars->at(s)->cfont = currItem->font();
-						chars->at(s)->csize = currItem->fontSize();
-						chars->at(s)->cstyle &= ~1919;
-						chars->at(s)->cstyle |= currItem->TxTStyle;
-						chars->at(s)->cshadowx = currItem->TxtShadowX;
-						chars->at(s)->cshadowy = currItem->TxtShadowY;
-						chars->at(s)->coutline = currItem->TxtOutline;
-						chars->at(s)->cunderpos = currItem->TxtUnderPos;
-						chars->at(s)->cunderwidth = currItem->TxtUnderWidth;
-						chars->at(s)->cstrikepos = currItem->TxtStrikePos;
-						chars->at(s)->cstrikewidth = currItem->TxtStrikeWidth;
+						if (chars->at(s)->cab > 4)
+						{
+							chars->at(s)->ccolor = currItem->TxtFill;
+							chars->at(s)->cshade = currItem->ShTxtFill;
+							chars->at(s)->cstroke = currItem->TxtStroke;
+							chars->at(s)->cshade2 = currItem->ShTxtStroke;
+							chars->at(s)->cfont = currItem->font();
+							chars->at(s)->csize = currItem->fontSize();
+							chars->at(s)->cstyle &= ~1919;
+							chars->at(s)->cstyle |= currItem->TxTStyle;
+							chars->at(s)->cshadowx = currItem->TxtShadowX;
+							chars->at(s)->cshadowy = currItem->TxtShadowY;
+							chars->at(s)->coutline = currItem->TxtOutline;
+							chars->at(s)->cunderpos = currItem->TxtUnderPos;
+							chars->at(s)->cunderwidth = currItem->TxtUnderWidth;
+							chars->at(s)->cstrikepos = currItem->TxtStrikePos;
+							chars->at(s)->cstrikewidth = currItem->TxtStrikeWidth;
+						}
+						chars->at(s)->cab = Editor->currentParaStyle;
 					}
-					chars->at(s)->cab = Editor->currentParaStyle;
 				}
 			Editor->updateFromChars(pa);
 			}
