[qet] [1533] Title block template rendering: minor optimization.

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 1533
Author:   xavier
Date:     2012-02-26 19:34:24 +0100 (Sun, 26 Feb 2012)
Log Message:
-----------
Title block template rendering: minor optimization.

Modified Paths:
--------------
    branches/0.3/sources/titleblocktemplate.cpp

Modified: branches/0.3/sources/titleblocktemplate.cpp
===================================================================
--- branches/0.3/sources/titleblocktemplate.cpp	2012-02-26 13:35:02 UTC (rev 1532)
+++ branches/0.3/sources/titleblocktemplate.cpp	2012-02-26 18:34:24 UTC (rev 1533)
@@ -1156,7 +1156,7 @@
 	// draw the titleblock border
 	painter.drawRect(QRect(0, 0, titleblock_width, titleblock_height));
 	
-	// run through each inidividual cell
+	// run through each individual cell
 	for (int j = 0 ; j < rows_heights_.count() ; ++ j) {
 		for (int i = 0 ; i < columns_width_.count() ; ++ i) {
 			if (cells_[i][j] -> spanner_cell || cells_[i][j] -> cell_type == TitleBlockCell::EmptyCell) continue;
@@ -1243,6 +1243,7 @@
 	@param cell_rect Rectangle delimiting the cell area
 */
 void TitleBlockTemplate::renderTextCell(QPainter &painter, const QString &text, const TitleBlockCell &cell, const QRectF &cell_rect) const {
+	if (text.isEmpty()) return;
 	QFont text_font = TitleBlockTemplate::fontForCell(cell);
 	painter.setFont(text_font);
 	


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/