r18622 by jghali - #11866: the character color style is not remembered

scribus-commit scribus-commit at lists.scribus.net
Wed Dec 4 23:13:03 UTC 2013


Author: jghali
Date: Wed Dec  4 23:13:03 2013
New Revision: 18622

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18622
Log:
#11866: the character color style is not remembered

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

Modified: branches/Version14x/Scribus/scribus/smtextstyles.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18622&path=/branches/Version14x/Scribus/scribus/smtextstyles.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/smtextstyles.cpp (original)
+++ branches/Version14x/Scribus/scribus/smtextstyles.cpp Wed Dec  4 23:13:03 2013
@@ -1126,9 +1126,11 @@
 		for (int i = 0; i < selection_.count(); ++i)
 			selection_[i]->charStyle().resetFillColor();
 	else {
-		QString c( pwidget_->cpage->fillColor_->currentText());
-		for (int i = 0; i < selection_.count(); ++i)
-			selection_[i]->charStyle().setFillColor(c);
+		QString col( pwidget_->cpage->fillColor_->currentText());
+		if (col == CommonStrings::tr_NoneColor)
+			col = CommonStrings::None;
+		for (int i = 0; i < selection_.count(); ++i)
+			selection_[i]->charStyle().setFillColor(col);
 	}
 	
 	if (!selectionIsDirty_)
@@ -1163,10 +1165,11 @@
 		for (int i = 0; i < selection_.count(); ++i)
 			selection_[i]->charStyle().resetStrokeColor();
 	else {
-		QString c(pwidget_->cpage->strokeColor_->currentText());
-
-		for (int i = 0; i < selection_.count(); ++i)
-			selection_[i]->charStyle().setStrokeColor(c);
+		QString col(pwidget_->cpage->strokeColor_->currentText());
+		if (col == CommonStrings::tr_NoneColor)
+			col = CommonStrings::None;
+		for (int i = 0; i < selection_.count(); ++i)
+			selection_[i]->charStyle().setStrokeColor(col);
 	}
 	
 	if (!selectionIsDirty_)
@@ -2050,7 +2053,8 @@
 			selection_[i]->resetFillColor();
 	else {		
 		QString col(page_->fillColor_->currentText());
-		
+		if (col == CommonStrings::tr_NoneColor)
+			col = CommonStrings::None;
 		for (int i = 0; i < selection_.count(); ++i)
 			selection_[i]->setFillColor(col);
 	}
@@ -2087,10 +2091,11 @@
 		for (int i = 0; i < selection_.count(); ++i)
 			selection_[i]->resetStrokeColor();
 	else {
-		QString c(page_->strokeColor_->currentText());
-
-		for (int i = 0; i < selection_.count(); ++i)
-			selection_[i]->setStrokeColor(c);
+		QString col(page_->strokeColor_->currentText());
+		if (col == CommonStrings::tr_NoneColor)
+			col = CommonStrings::None;
+		for (int i = 0; i < selection_.count(); ++i)
+			selection_[i]->setStrokeColor(col);
 	}
 	
 	if (!selectionIsDirty_)




More information about the scribus-commit mailing list