r15657 by jghali - #9337: the font of the first line of the text in the story editor cannot be changed after first change

scribus-commit scribus-commit at lists.scribus.net
Tue Oct 26 21:46:58 CEST 2010


Author: jghali
Date: Tue Oct 26 19:46:57 2010
New Revision: 15657

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=15657
Log:
#9337: the font of the first line of the text in the story editor cannot be changed after first change
#9376: text Display Broken after reopening document
#9428: copy/paste in text frame are modyfing other characters

Revert commit r15368, cause more bugs than it fixes

Modified:
    branches/Version135/Scribus/scribus/text/storytext.cpp

Modified: branches/Version135/Scribus/scribus/text/storytext.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15657&path=/branches/Version135/Scribus/scribus/text/storytext.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/text/storytext.cpp (original)
+++ branches/Version135/Scribus/scribus/text/storytext.cpp Tue Oct 26 19:46:57 2010
@@ -634,21 +634,26 @@
 	ScText* itText;
 	for (uint i=pos; i < pos+len; ++i) {
 		itText = d->at(i);
-		// #6165 : applying style on last character applies style on whole text on next open
+		// #6165 : applying style on last character applies style on whole text on next open 
+		/*if (itText->ch == SpecialChars::PARSEP && itText->parstyle != NULL)
+			itText->parstyle->charStyle().applyCharStyle(style);*/
+
+		// Does not work well, do not reenable before checking #9337, #9376 and #9428
 		// #9173 et. al.: move charstyle to parstyle if whole paragraph is affected
-		if (itText->ch == SpecialChars::PARSEP && itText->parstyle != NULL && lastParStart >= 0)
+		/*if (itText->ch == SpecialChars::PARSEP && itText->parstyle != NULL && lastParStart >= 0)
 		{
 			eraseCharStyle(lastParStart, i - lastParStart, style);
 			itText->parstyle->charStyle().applyCharStyle(style);
 			lastParStart = i + 1;
-		}
+		}*/
 		itText->applyCharStyle(style);
 	}
-	if (pos + signed(len) == length() && lastParStart >= 0)
+	// Does not work well,  do not reenable before checking #9337, #9376 and #9428
+	/*if (pos + signed(len) == length() && lastParStart >= 0)
 	{
 		eraseCharStyle(lastParStart, length() - lastParStart, style);
 		d->trailingStyle.charStyle().applyCharStyle(style);
-	}
+	}*/
 	
 	invalidate(pos, pos + len);
 }
@@ -674,10 +679,11 @@
 			itText->parstyle->charStyle().eraseCharStyle(style);
 		itText->eraseCharStyle(style);
 	}
-	if (pos + signed(len) == length())
+	// Does not work well,  do not reenable before checking #9337, #9376 and #9428
+	/*if (pos + signed(len) == length())
 	{
 		d->trailingStyle.charStyle().eraseCharStyle(style);
-	}
+	}*/
 	
 	invalidate(pos, pos + len);
 }




More information about the scribus-commit mailing list