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

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


Author: jghali
Date: Wed Dec  4 23:14:02 2013
New Revision: 18623

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

Modified:
    trunk/Scribus/scribus/ui/smtextstyles.cpp

Modified: trunk/Scribus/scribus/ui/smtextstyles.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18623&path=/trunk/Scribus/scribus/ui/smtextstyles.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smtextstyles.cpp (original)
+++ trunk/Scribus/scribus/ui/smtextstyles.cpp Wed Dec  4 23:14:02 2013
@@ -1513,9 +1513,11 @@
 		for (int i = 0; i < m_selection.count(); ++i)
 			m_selection[i]->charStyle().resetFillColor();
 	else {
-		QString c( m_pwidget->cpage->fillColor_->currentText());
-		for (int i = 0; i < m_selection.count(); ++i)
-			m_selection[i]->charStyle().setFillColor(c);
+		QString col( m_pwidget->cpage->fillColor_->currentText());
+		if (col == CommonStrings::tr_NoneColor)
+			col = CommonStrings::None;
+		for (int i = 0; i < m_selection.count(); ++i)
+			m_selection[i]->charStyle().setFillColor(col);
 	}
 	
 	if (!m_selectionIsDirty)
@@ -1550,10 +1552,11 @@
 		for (int i = 0; i < m_selection.count(); ++i)
 			m_selection[i]->charStyle().resetStrokeColor();
 	else {
-		QString c(m_pwidget->cpage->strokeColor_->currentText());
-
-		for (int i = 0; i < m_selection.count(); ++i)
-			m_selection[i]->charStyle().setStrokeColor(c);
+		QString col(m_pwidget->cpage->strokeColor_->currentText());
+		if (col == CommonStrings::tr_NoneColor)
+			col = CommonStrings::None;
+		for (int i = 0; i < m_selection.count(); ++i)
+			m_selection[i]->charStyle().setStrokeColor(col);
 	}
 	
 	if (!m_selectionIsDirty)
@@ -2435,7 +2438,8 @@
 			m_selection[i]->resetFillColor();
 	else {		
 		QString col(m_page->fillColor_->currentText());
-		
+		if (col == CommonStrings::tr_NoneColor)
+			col = CommonStrings::None;
 		for (int i = 0; i < m_selection.count(); ++i)
 			m_selection[i]->setFillColor(col);
 	}
@@ -2472,10 +2476,11 @@
 		for (int i = 0; i < m_selection.count(); ++i)
 			m_selection[i]->resetStrokeColor();
 	else {
-		QString c(m_page->strokeColor_->currentText());
-
-		for (int i = 0; i < m_selection.count(); ++i)
-			m_selection[i]->setStrokeColor(c);
+		QString col(m_page->strokeColor_->currentText());
+		if (col == CommonStrings::tr_NoneColor)
+			col = CommonStrings::None;
+		for (int i = 0; i < m_selection.count(); ++i)
+			m_selection[i]->setStrokeColor(col);
 	}
 	
 	if (!m_selectionIsDirty)
@@ -2716,6 +2721,3 @@
 	m_widget = 0;
 }
 
-
-
-




More information about the scribus-commit mailing list