r19908 by jghali - #12945: Modifying table cell color affects only one cell in selection

scribus-commit scribus-commit at lists.scribus.net
Tue Mar 10 22:35:01 UTC 2015


Author: jghali
Date: Tue Mar 10 22:35:01 2015
New Revision: 19908

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19908
Log:
#12945: Modifying table cell color affects only one cell in selection

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

Modified: trunk/Scribus/scribus/ui/propertiespalette_table.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19908&path=/trunk/Scribus/scribus/ui/propertiespalette_table.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_table.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_table.cpp Tue Mar 10 22:35:01 2015
@@ -497,9 +497,14 @@
 	}
 	else
 	{
-		TableCell cell = table->activeCell();
-		cell.setFillColor(color);
-		cell.setFillShade(fillShade->value());
+		QSet<TableCell> cells = table->selectedCells();
+		QSet<TableCell>::Iterator cellIter;
+		for (cellIter = cells.begin(); cellIter != cells.end(); cellIter++)
+		{
+			TableCell currentCell(*cellIter);
+			currentCell.setFillColor(color);
+			currentCell.setFillShade(fillShade->value());
+		}
 	}
 
 	table->update();
@@ -521,9 +526,14 @@
 	}
 	else
 	{
-		TableCell cell = table->activeCell();
-		cell.setFillColor(color);
-		cell.setFillShade(shade);
+		QSet<TableCell> cells = table->selectedCells();
+		QSet<TableCell>::Iterator cellIter;
+		for (cellIter = cells.begin(); cellIter != cells.end(); cellIter++)
+		{
+			TableCell currentCell(*cellIter);
+			currentCell.setFillColor(color);
+			currentCell.setFillShade(shade);
+		}
 	}
 	table->update();
 }




More information about the scribus-commit mailing list