r21132 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Mon Mar 28 22:00:07 UTC 2016


Author: jghali
Date: Mon Mar 28 22:00:06 2016
New Revision: 21132

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21132
Log:
#6235: bad display of character STYLE when selection is not empty

Modified:
    trunk/Scribus/scribus/pageitem.h
    trunk/Scribus/scribus/pageitem_table.cpp
    trunk/Scribus/scribus/pageitem_table.h
    trunk/Scribus/scribus/scribus.cpp

Modified: trunk/Scribus/scribus/pageitem.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21132&path=/trunk/Scribus/scribus/pageitem.h
==============================================================================
--- trunk/Scribus/scribus/pageitem.h	(original)
+++ trunk/Scribus/scribus/pageitem.h	Mon Mar 28 22:00:06 2016
@@ -413,7 +413,7 @@
 	/// returns the style at the current charpos
 	const CharStyle& currentCharStyle() const;
 	/// Return current text properties (current char + paragraph properties)
-	void currentTextProps(ParagraphStyle& parStyle) const;
+	virtual void currentTextProps(ParagraphStyle& parStyle) const;
 	// deprecated:
 	GlyphLayout layoutGlyphs(const CharStyle& style, const QString& chars, LayoutFlags flags);
 	void SetQColor(QColor *tmp, QString farbe, double shad);

Modified: trunk/Scribus/scribus/pageitem_table.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21132&path=/trunk/Scribus/scribus/pageitem_table.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_table.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_table.cpp	Mon Mar 28 22:00:06 2016
@@ -70,6 +70,14 @@
 	adjustTableToFrame();
 	adjustFrameToTable();
 	doc()->dontResize = false;
+}
+
+void PageItem_Table::currentTextProps(ParagraphStyle& parStyle) const
+{
+	if (m_Doc && (m_Doc->appMode == modeEditTable))
+		m_activeCell.textFrame()->currentTextProps(parStyle);
+	else
+		parStyle = this->itemText.defaultStyle();
 }
 
 void PageItem_Table::resize(double width, double height)

Modified: trunk/Scribus/scribus/pageitem_table.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21132&path=/trunk/Scribus/scribus/pageitem_table.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_table.h	(original)
+++ trunk/Scribus/scribus/pageitem_table.h	Mon Mar 28 22:00:06 2016
@@ -91,6 +91,9 @@
 	/// Resizes the table to fit the frame.
 	void adjustTable();
 
+	/// Return current text properties (current char + paragraph properties)
+	virtual void currentTextProps(ParagraphStyle& parStyle) const;
+
 	/// Returns the number of rows in the table.
 	int rows() const { return m_rows; }
 

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21132&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Mon Mar 28 22:00:06 2016
@@ -1448,8 +1448,10 @@
 	propertiesPalette->textPal->showParStyle(currPStyle.parent());
 	propertiesPalette->textPal->showCharStyle(item->currentCharStyle().parent());
 	doc->currentStyle = item->currentStyle();
-	// #8112 : do not use operator= here as it does not update style features
-	doc->currentStyle.charStyle().setStyle(item->currentCharStyle());
+	if (doc->appMode == modeEdit || doc->appMode == modeEditTable)
+		item->currentTextProps(doc->currentStyle);
+	else
+		doc->currentStyle.charStyle().setStyle(item->currentCharStyle());
 	emit TextStyle(doc->currentStyle);
 	// to go: (av)
 	propertiesPalette->textPal->updateStyle(doc->currentStyle);




More information about the scribus-commit mailing list