X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Flayer_composite.cpp;h=16f2c3338e428e9a850200c35e5295858c7e90da;hb=ee0fd97e97433501befb38b88478ab4eb7487ff5;hp=b7880112b75d2ecf6d06132de2ced00d4291ad69;hpb=a50de53f5e4b23b1e3c0d79866a8503758422dba;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/layer_composite.cpp b/synfig-core/trunk/src/synfig/layer_composite.cpp index b788011..16f2c33 100644 --- a/synfig-core/trunk/src/synfig/layer_composite.cpp +++ b/synfig-core/trunk/src/synfig/layer_composite.cpp @@ -164,7 +164,7 @@ Layer_Composite::set_param(const String & param, const ValueBase &value) return false; } - if (blend_method_ == Color::BLEND_STRAIGHT) + if (blend_method_ == Color::BLEND_STRAIGHT && !reads_context()) { Canvas::Handle canvas(get_canvas()); if (canvas) @@ -176,7 +176,16 @@ Layer_Composite::set_param(const String & param, const ValueBase &value) warning("loaded a version %s canvas with a 'Straight' blended PasteCanvas (%s) - check it renders OK", version.c_str(), get_non_empty_description().c_str()); else + { blend_method_ = Color::BLEND_COMPOSITE; + converted_blend_ = true; + + // if this layer has a transparent color, go back and set the color again + // now that we know we are converting the blend method as well. that will + // make the color non-transparent, and change the blend method to alpha over + if (transparent_color_) + set_param("color", get_param("color")); + } } } }