r21653 by jghali - #14462 follow-up: collect shadow color for groups and process shadow color in replaceNamedResources()
scribus-commit
scribus-commit at lists.scribus.net
Thu Dec 15 18:23:32 UTC 2016
Author: jghali
Date: Thu Dec 15 18:23:32 2016
New Revision: 21653
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21653
Log:
#14462 follow-up: collect shadow color for groups and process shadow color in replaceNamedResources()
Modified:
trunk/Scribus/scribus/pageitem.cpp
trunk/Scribus/scribus/pageitem_group.cpp
Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21653&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Thu Dec 15 18:23:32 2016
@@ -7544,15 +7544,19 @@
void PageItem::replaceNamedResources(ResourceCollection& newNames)
{
QMap<QString,QString>::ConstIterator it;
-
+
+ it = newNames.colors().find(softShadowColor());
+ if (it != newNames.colors().end())
+ setSoftShadowColor(*it);
+
it = newNames.colors().find(fillColor());
if (it != newNames.colors().end())
setFillColor(*it);
-
+
it = newNames.colors().find(lineColor());
if (it != newNames.colors().end())
setLineColor(*it);
-
+
it = newNames.colors().find(GrColorP1);
if (it != newNames.colors().end())
GrColorP1 = *it;
Modified: trunk/Scribus/scribus/pageitem_group.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21653&path=/trunk/Scribus/scribus/pageitem_group.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_group.cpp (original)
+++ trunk/Scribus/scribus/pageitem_group.cpp Thu Dec 15 18:23:32 2016
@@ -104,6 +104,12 @@
void PageItem_Group::replaceNamedResources(ResourceCollection& newNames)
{
+ QMap<QString,QString>::ConstIterator it;
+
+ it = newNames.colors().find(softShadowColor());
+ if (it != newNames.colors().end())
+ setSoftShadowColor(*it);
+
for (int em = 0; em < groupItemList.count(); ++em)
{
PageItem* embedded = groupItemList.at(em);
@@ -113,6 +119,9 @@
void PageItem_Group::getNamedResources(ResourceCollection& lists) const
{
+ if (hasSoftShadow())
+ lists.collectColor(softShadowColor());
+
for (int em = 0; em < groupItemList.count(); ++em)
{
PageItem* embedded = groupItemList.at(em);
More information about the scribus-commit
mailing list